String Subsequence
Start Timer
0:00:00
Given two strings, string1
and string2
, write a function is_subsequence
to find out if string1
is a subsequence of string2
.
Bonus: A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements.
Example:
Input:
string1 = 'abc'
string2 = 'asbsc'
string3 = 'acedb'
is_subsequence(string1, string2) -> True
is_subsequence(string1, string3) -> False
Recommended questions for you
Personalized based on your user activity, skill level, and preferences.
.
.
.
.
.
.
.
.
.
Comments