Skip to content

Commit 3bf6557

Browse files
committed
add explanation
1 parent 3896697 commit 3bf6557

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Myers Difference Algorithm/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ MDA generates the edit graph through the following steps:
3434
3. Check the points `(i, j)`, where `X[i] = Y[j]`, called match point, light green one.
3535
4. Connect vertex `(i - 1, j - 1)` and vertex `(i, j)`, where `(i, j)` is match point, then diagonal edge appears.
3636

37+
Each elements on the figure shows that,
38+
- `Red number and dotted lines`: The red number is the value of k and dotted lines are k-line.
39+
- `Green dots: The match points`, which is the point `(i, j)` where `X[i] == Y[j]`
40+
- `Blue line`: The shortest path from source to sink, which is the path we are going to find finally.
41+
3742
> **Note:** Here, the sequences' start index is 1 not 0, so `X[1] = A`, `Y[1] = C`
3843
3944
We discuss about which path is the shortest from `source` to `sink`. Can move on the edges on the graph. I mean we can move on the grid, horizontal and vertical edges, and the diagonal edges.

0 commit comments

Comments
 (0)