Java Simple DFS
\nclass CombinationIterator {\n    char[] arr;\n    List<String> l = new ArrayList<>();\n    Set<Character> st = new HashSet<>();\n    int index = 0;\n    publi
```\nclass CombinationIterator {\n    char[] arr;\n    List<String> l = new ArrayList<>();\n    Set<Character> st = new HashSet<>();\n    int index = 0;\n    public CombinationIterator(String characters, int combinationLength) {\n        arr = characters.toCharArray();\n        getPerm(combinationLength, 0, "");\n    }\n    \n    public String next() {\n        return l.get(index++);\n    }\n    \n    public boolean hasNext() {\n        return index < l.size();\n    }\n    \n    private void getPerm(int len, int idx, String path) {\n        if (len == 0) {\n            l.add(path);\n            return;\n        }\n        for (int i = idx; i < arr.length; i++) {\n            if (st.contains(arr[i])) continue;\n            st.add(arr[i]);\n            getPerm(len - 1, i + 1, path + String.valueOf(arr[i]));\n            st.remove(arr[i]);\n            if (l.size() > 10_000) break;\n        }\n    }\n}\n```
[]