public List<List<String>> partition(String s) { List<List<String>> res = new LinkedList<List<String>>(); List<String> temp = new ArrayList<String>(); recursive(0, s.toCharArray(), temp, res); return res; }