Word Break
Problem
Given a string and a dictionary of words, return true if the string can be segmented into a space-separated sequence of one or more dictionary words (words may be reused).
Example
s="applepen", dict=[apple,pen] -> true
Constraints
- 1 ≤ |s| ≤ 300
added …