private boolean wordBreakHelper(String s,
                Map<Character, List<String>> indexWords) {
            if (s.equals(""))
                return true;
            Character ch = s.charAt(0);
            if (!indexWords.keySet().contains(ch))
                return false;
            else {
                for (String word : indexWords.get(ch)) {
                    int length = word.length();
                    if (length > s.length())
                        continue;
                    if (s.substring(0, length).equals(word)) {
                        if (wordBreakHelper(s.substring(length), indexWords))
                            return true;
                    }
                }
                return false;
            }
        }