Word Break

Approach 1: Dynamic Programming approach. O(n^2) time and O(n) spaces.
Have the offset starts from 1 to s.length, check the s.subString(start,
offset) is in the dictionary or not. If yes, save the end
point(offset). For next offset, loop through all the saved end points,
have each end point as the start, and check s.subString(start, offset)
in the dictionary or not. If yes, save the new end point.

After the loop, check if the end point is the length of s or not. If
yes, that means there is a match.