MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / judge

Method judge

String/ReplaceWords.py:64–72  ·  view source on GitHub ↗
(dict_word, word)

Source from the content-addressed store, hash-verified

62 """
63
64 def judge(dict_word, word):
65 for i in dict_word:
66 if not word:
67 return False
68 if i == word[0]:
69 word = word[1:]
70 continue
71 return False
72 return True
73
74 dicts = sorted(dict, key=len)
75 sentence = sentence.split(' ')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected