Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Number of Matching Subsequences
Bookmark
Input
Standard
Complex
Custom
s
=
abcde
,
words
=
[a, bb, acd, ace]
s
a
b
c
d
e
words (matching against s)
w0
a
needs
'a'
w1
b
b
needs
'b'
w2
a
c
d
needs
'a'
w3
a
c
e
needs
'a'
matches: count = 0
algo
master
.
io
Step:
Count how many words are subsequences of s
0 / 22
Input
Standard
Complex
Custom
s
=
abcde
,
words
=
[a, bb, acd, ace]
0 / 22
s
a
b
c
d
e
words (matching against s)
w0
a
needs
'a'
w1
b
b
needs
'b'
w2
a
c
d
needs
'a'
w3
a
c
e
needs
'a'
matches: count = 0
algo
master
.
io
Step:
Count how many words are subsequences of s