Skip to content

Commit 3ab5260

Browse files
committed
Time: 0 ms (100.00%) | Memory: 19.4 MB (25.83%) - LeetSync
1 parent 2cffa48 commit 3ab5260

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution:
2+
def isSubsequence(self, s: str, t: str) -> bool:
3+
s1=0
4+
for i in s:
5+
j=s1
6+
while j<len(t):
7+
if t[j]==i:
8+
s1=j+1
9+
break
10+
j+=1
11+
if j==len(t):
12+
return False
13+
return True

0 commit comments

Comments
 (0)