C++ Simple using Backtracking(Faster than 90%)
Simply just generate all the combinations of length==combinationlength and then implement the functions asked in the question.\n\nclass CombinationIterator {\np
Simply just generate all the combinations of length==combinationlength and then implement the functions asked in the question.\n```\nclass CombinationIterator {\npublic:\n    vector<string> temp;\n    int i;\n    CombinationIterator(string characters, int combinationlength) {\n        i=0;\n        \n        backtrack(characters,combinationlength,0,"");\n    }\n    \n    void backtrack(string characters,int combinationlength,int idx,string ans){\n        if(ans.size()==combinationlength){\n            temp.push_back(ans);\n            return;\n        }\n        for(int i=idx;i<characters.size();i++){\n            ans.push_back(characters[i]);\n            backtrack(characters,combinationlength,i+1,ans);\n            ans.pop_back();\n        }\n    }\n    \n    string next() {\n        return temp[i++];\n    }\n    \n    bool hasNext() {\n        return i<temp.size();\n    }\n};\n\n/**\n\n```
['Backtracking', 'C', 'C++']