Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Longest Palindromic Subsequence
Bookmark
Input
Example 1
Example 2
Example 3
Custom
s
=
bbbab
s =
"bbbab"
end j
start i
0
1
2
3
4
b
b
b
a
b
0
1
2
3
4
b
b
b
a
b
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
longest palindromic subsequence inside "bbbab"? order kept, gaps allowed
algo
master
.
io
Step:
Longest palindromic subsequence inside "bbbab"?
0 / 26
Input
Example 1
Example 2
Example 3
Custom
s
=
bbbab
0 / 26
s =
"bbbab"
end j
start i
0
1
2
3
4
b
b
b
a
b
0
1
2
3
4
b
b
b
a
b
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
longest palindromic subsequence inside "bbbab"? order kept, gaps allowed
algo
master
.
io
Step:
Longest palindromic subsequence inside "bbbab"?