class Solution:
def isPrefixString(self, s: str, words: List[str]) -> bool:
for w in words:
if len(s) == 0:
return True
if len(w) > len(s):
return False
if w != s[:len(w)]:
return False
s = s[len(w):]
if len(s) == 0:
return True
return False
Th thớt là nó đó
giờ mới biết. Tag hết mấy thằng chơi leetcode vào đi, tau dạo này vọc sang AI , data nhiều không sờ vào thuật toán nhìn cũng ngứa ngứaTh thớt là nó đó