Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Longest Common Subsequence
Bookmark
Input
Example 1
Example 2 (identical)
Example 3 (no match)
Example 4
Custom
text1
=
abcde
,
text2
=
ace
a
b
c
d
e
a
c
e
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
text1
text2
dp
0
1
2
3
0
1
2
3
4
5
algo
master
.
io
Step:
Start Longest Common Subsequence
0 / 32
Input
Example 1
Example 2 (identical)
Example 3 (no match)
Example 4
Custom
text1
=
abcde
,
text2
=
ace
0 / 32
a
b
c
d
e
a
c
e
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
text1
text2
dp
0
1
2
3
0
1
2
3
4
5
algo
master
.
io
Step:
Start Longest Common Subsequence