Python dfs
\nclass CombinationIterator(object):\n\n    def __init__(self, characters, combinationLength):\n        """\n        :type characters: str\n        :type combin
```\nclass CombinationIterator(object):\n\n    def __init__(self, characters, combinationLength):\n        """\n        :type characters: str\n        :type combinationLength: int\n        """\n        self.char = characters\n        self.comb = combinationLength\n        self.cur = 0\n        \n        self.comblist = [] # [\'ab\',\'ac\',\'bc\'] # populate the list with combinationLength\n        self.helper(\'\', 0, self.comb, self.comblist,0)\n \n        \n    def helper(self, strin , ind, cap, res, cumu):\n        if cumu == cap:\n            res.append(strin)\n            return \n        for i in range(ind, len(self.char)):\n            self.helper( strin + self.char[i] , i+1, cap,res, cumu+1 )\n  \n \n        \n    def next(self):\n        """\n        :rtype: str\n        """\n        self.cur += 1\n        return self.comblist[self.cur - 1]\n        \n        \n\n    def hasNext(self):\n        """\n        :rtype: bool\n        """\n        return self.cur < len(self.comblist) \n\t\t\n```
[]