Loading problem…
Given a string s and a dictionary of words wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.
s
wordDict
true
wordBreak('frontendinterviews', ['frontend', 'interviews']); // true wordBreak('catsandog', ['cats', 'dog', 'sand', 'and', 'cat']); // false
2 hints available with Pro