[Java] Using Queue, hasNext 0(1), next 0(1)
```\nclass CombinationIterator {\n\n    Queue qu = new LinkedList();\n    String orig = "";\n    public CombinationIterator(String characters, int combinationLe
```\nclass CombinationIterator {\n\n    Queue<String> qu = new LinkedList();\n    String orig = "";\n    public CombinationIterator(String characters, int combinationLength) {\n        orig = characters;\n        find("", 0, combinationLength);\n    }\n    \n    void find(String str, int index, int len) {\n        if(len ==0) {\n            qu.add(str);\n            return;\n        }\n        for(int i= index; i<orig.length(); i++) {\n            char ch = orig.charAt(i);\n            find(str+ch , i+1, len-1);\n        }\n        \n    }\n    \n    public String next() {\n        if(!qu.isEmpty()) {\n            return qu.poll();\n        }\n        return "";\n    }\n    \n    public boolean hasNext() {\n        return !qu.isEmpty();\n    }\n}\n
[]