Skip to content

Commit f4afbab

Browse files
authored
Refactors first blurb.
1 parent 3bf6557 commit f4afbab

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Myers Difference Algorithm/README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Myers Difference Algorithm
22

3-
Myers Difference Algorithm is an algorithm that finds a longest common subsequence(LCS) or shortest edit scripts(SES) of two sequences. MDA can accomplish this in O(ND) time, where N is the sum of the lengths of the two sequences. The common subsequence of two sequences is the sequence of elements that appear in the same order in both sequences.
4-
5-
For example, let's assume you have two arrays:
3+
Myers Difference Algorithm(MDA) is an algorithm that finds a longest common subsequence(LCS) or shortest edit scripts(SES) of two sequences. The common subsequence of two sequences is the sequence of elements that appear in the same order in both sequences. For example, let's assume you have two arrays:
64

75
```
8-
A = [1, 2, 3]
9-
B = [2, 3, 4]
6+
let firstArray = [1, 2, 3]
7+
let secondArray = [2, 3, 4]
108
```
119

12-
The common subsequences of these two arrays are `[2]`, and `[2,3]`. The longest common sequence in this case is `[2,3]`.
10+
The common subsequences of these two arrays are `[2]`, and `[2, 3]`. The longest common sequence in this case is `[2, 3]`. MDA can accomplish this in O(ND) time, where N is the sum of the lengths of the two sequences.
1311

1412
## Finding the length of the Longest Common Subsequence with Myers Algorithm on Edit Graph
1513

0 commit comments

Comments
 (0)