Loading...
Given a string s and a word dictionary, return True if s can be segmented into space-separated sequence of dictionary words.
leetcode leet,code
True
s is "leetcode" and the word dictionary contains "leet" and "code".s into a sequence of dictionary words, starting with "leet" which matches the first 4 characters of s.s can be segmented into a sequence of dictionary words ("leet" and "code"), the output is True.