Created
February 16, 2020 10:18
-
-
Save minhntm/80457b4e12bf8fa983797d4102c189b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
def isSubsequence(self, s: str, t: str) -> bool: | |
for c in s: | |
i = t.find(c) | |
if i == -1: | |
return False | |
else: | |
t = t[i+1:] | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment