Worst Java Solution
\n```\nclass CombinationIterator {\n\n        int count;\n        String string;\n        int len;\n        List list;\n\n        public CombinationIterator(Str
\n```\nclass CombinationIterator {\n\n        int count;\n        String string;\n        int len;\n        List<String> list;\n\n        public CombinationIterator(String characters, int combinationLength) {\n            count = 0;\n            string = characters;\n            len = combinationLength;\n            list = new ArrayList<>();\n            generateCombinations(new StringBuilder(), 0);\n        }\n\n        private void generateCombinations(StringBuilder sb, int indexStartOfWord) {\n            if (sb.length() >= len) {\n                if (list.contains(sb.toString())) {\n                    return;\n                }\n                list.add(sb.toString());\n                return;\n            }\n\n            for (int i = indexStartOfWord; i < string.length(); i++) {\n                sb.append(string.charAt(i));\n                generateCombinations(sb, i + 1);\n                sb.deleteCharAt(sb.length() - 1);\n            }\n        }\n\n        public String next() {\n            return list.get(count++);\n        }\n\n        public boolean hasNext() {\n            return count < list.size();\n        }\n}
[]