Uber Eats may need to validate whether a normalized search string can be assembled from known menu or query tokens. Given a string s and a list wordDict, determine whether s can be segmented into one or more dictionary words. A dictionary word may be used multiple times.
Implement word_break(s, wordDict).
s, a lowercase string, and wordDict, a list of lowercase strings.True if s can be fully segmented into dictionary words. Otherwise, return False.def word_break(s, wordDict):