@@ -0,0 +1,1242 @@
+public class Solution %7B%0A    public List%3CString%3E wordBreak(String s, Set%3CString%3E dict) %7B%0A        List%3CStringBuilder%3E result = wordBreakRecur(s, dict, 0);%0A        List%3CString%3E ret = new ArrayList%3C%3E ();%0A        %0A        if (result != null) %7B%0A            for(StringBuilder words: result) %7B%0A                ret.add(words.toString());%0A            %7D%0A        %7D%0A        %0A        return ret;%0A    %7D%0A    %0A    private List%3CStringBuilder%3E wordBreakRecur(String s, Set%3CString%3E dict, int start)%7B%0A        List%3CStringBuilder%3E ret = new ArrayList%3C%3E ();%0A        if (start == s.length()) %7B%0A            ret.add(new StringBuilder());%0A            return ret;%0A        %7D%0A        %0A        for(int i=start; i%3Cs.length(); i++) %7B%0A            String word = s.substring(start, i+1);%0A            if (dict.contains(word))%7B%0A                List%3CStringBuilder%3E wordsList = wordBreakRecur(s, dict, i+1);%0A                if (wordsList != null) %7B%0A                    for(StringBuilder subWords: wordsList) %7B%0A                        subWords.insert(0, word + ' ');%0A                        ret.add(subWords);%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A        %0A        if(ret.size() %3E 0) %7B%0A            return ret;%0A        %7D%0A        %0A        return null;%0A    %7D%0A%7D%0A

Create Word_Break_II.java