Python solution with backtracking and yield generator
its a classic backtrack problem but a little trick with iterator, i use yield statement, but cant know if has next item ahead  from generator, so two methonds w
its a classic backtrack problem but a little trick with iterator, i use yield statement, but cant know if has next item ahead  from generator, so two methonds we can use to know it: 1. precompute total number of combination(we know length of characters and size of combination, so its trival) and count how many next has been called. 2.use python exception mechanism,catch StopIteration Exception if we iterated at end:\n```\nclass CombinationIterator:\n    def __init__(self, characters: str, combinationLength: int):\n        self._combinationLength=combinationLength\n        self._s=characters\n        self._gen=self._backTrack(0,[])\n        self._next=next(self._gen)\n        \n    def _backTrack(self,idx,stcks):\n        if len(stcks)==self._combinationLength:yield \'\'.join(stcks)\n        for jdx in range(idx,len(self._s)):\n            stcks.append(self._s[jdx])\n            yield from self._backTrack(jdx+1,stcks)\n            stcks.pop()\n        \n    def next(self) -> str:\n        ret=self._next\n        try:\n            self._next=next(self._gen)\n        except StopIteration:\n            self._next=None\n            pass\n        return ret\n    \n    def hasNext(self) -> bool:    \n        return self._next!=None\n```
['Backtracking', 'Python3']