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.
1 parent ff19b2a commit 75cf544Copy full SHA for 75cf544
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