Skip to content

Commit a4519f3

Browse files
Added solution for 392_is_subsequence (qiyuangong#62)
* Added solution for 392_is_subsequence * Fixed the code style Co-authored-by: Shekhar-Inochi <[email protected]>
1 parent 183f57f commit a4519f3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

python/392_Is_Subsequence.py

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

0 commit comments

Comments
 (0)