C++ Brute Force Recursion
\nclass CombinationIterator {\npublic:\n    vector<string> ret;\n    int cnt;\n    void f(string s, string chr, int i, int l) {\n        if(l < 0) {\n          
```\nclass CombinationIterator {\npublic:\n    vector<string> ret;\n    int cnt;\n    void f(string s, string chr, int i, int l) {\n        if(l < 0) {\n            return;\n        }\n        if(i == chr.size()) {\n            if(l == 0)\n                ret.push_back(s);\n            return;\n        }\n        f(s + chr[i], chr, i + 1, l - 1);\n        f(s, chr, i + 1, l);\n    }\n    \n    CombinationIterator(string chr, int l) {\n        cnt = 0;\n        ret.clear();\n        f("", chr, 0, l);\n    }\n    \n    string next() {\n        return ret[cnt++];\n    }\n    \n    bool hasNext() {\n        return (cnt < ret.size());\n    }\n};\n\n/**\n * Your CombinationIterator object will be instantiated and called as such:\n * CombinationIterator* obj = new CombinationIterator(characters, combinationLength);\n * string param_1 = obj->next();\n * bool param_2 = obj->hasNext();\n */\n```
[]