Skip to content

Commit 6c96157

Browse files
committed
O(n) time and O(1) space using extra variable
1 parent 7ee4e90 commit 6c96157

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

392. Is Subsequence/392. Is Subsequence.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ def isSubsequence(self, s: str, t: str) -> bool:
3333
count += 1
3434
if count >= len(s):
3535
return True
36-
return count == len(s)
36+
return False

0 commit comments

Comments
 (0)