public boolean wordBreakTopDownOneSolution(String s, Set<String> wordDict) {
        Map<Integer, Boolean> dp = new HashMap<>();
        int max = 0;
        for (String s1 : wordDict) {
            max = Math.max(max, s1.length());
        }
        return wordBreakTopDownOneSolutionUtil(s, wordDict, 0, max, dp);

    }
Check if any one solution exists.
https://leetcode.com/problems/word-break/
src/com/interview/dynamic/BreakMultipleWordsWithNoSpaceIntoSpace.java