public ArrayList<String> wordBreak(String s, Set<String> dict) {
        ArrayList<String> res = new ArrayList<String>();
        if(s == null || s.length() == 0)
            return res;
        res = recBreak(s, dict);
        return (res != null)?res:new ArrayList<String>();
    }