We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f7292a commit d115a4fCopy full SHA for d115a4f
dynamic_programming/word_break.py
@@ -58,8 +58,8 @@ def word_break(string: str, words: list[str]) -> bool:
58
if not isinstance(string, str) or len(string) == 0:
59
raise ValueError("the string should be not empty string")
60
61
- if not isinstance(word_dict, list) or not all(
62
- isinstance(item, str) and len(item) > 0 for item in word_dict
+ if not isinstance(words, list) or not all(
+ isinstance(item, str) and len(item) > 0 for item in words
63
):
64
raise ValueError("the word_dict should a list of non empty string")
65
0 commit comments