public List<String> wordBreakTopDown(String s, Set<String> wordDict) {
        Map<Integer, List<String>> dp = new HashMap<>();
        int max = 0;
        for (String s1 : wordDict) {
            max = Math.max(max, s1.length());
        }
        return wordBreakUtil(s, wordDict, dp, 0, max);
    }
Prints all the words possible instead of just one combination.
Reference
https://leetcode.com/problems/word-break-ii/
src/com/interview/dynamic/BreakMultipleWordsWithNoSpaceIntoSpace.java