Skip to content

Instantly share code, notes, and snippets.

@minhntm
Created February 16, 2020 10:18
Show Gist options
  • Save minhntm/80457b4e12bf8fa983797d4102c189b8 to your computer and use it in GitHub Desktop.
Save minhntm/80457b4e12bf8fa983797d4102c189b8 to your computer and use it in GitHub Desktop.
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