We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18ee23d + 7e6ba04 commit fd66535Copy full SHA for fd66535
python/392-Is-Subsequence.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def isSubsequence(self, s: str, t: str) -> bool:
3
+ i, j = 0, 0
4
+ while i < len(s) and j < len(t):
5
+ if s[i] == t[j]:
6
+ i += 1
7
+ j += 1
8
+ return i == len(s)
0 commit comments