class Solution { public boolean wordBreak(String s, List wordDict) { boolean[] dp = new boolean[s.length()+1]; dp[0] = true; for(int i=1; i<=s.length(); i++) { for(int j=0; j