Python bitmask solution
\nclass CombinationIterator:\n\n    def __init__(self, characters: str, combinationLength: int):\n        self.n, self.k = len(characters), combinationLength\n 
```\nclass CombinationIterator:\n\n    def __init__(self, characters: str, combinationLength: int):\n        self.n, self.k = len(characters), combinationLength\n        self.bitmask = (1 << self.n) - 1\n        self.characters = characters\n\n    def next(self) -> str:\n        while self.bitmask > 0:\n            # use bitmasks with k 1-bits\n            if bin(self.bitmask).count(\'1\') == self.k:\n                # convert bitmask into combination\n                curr = []\n                for i in range(self.n):\n                    if self.bitmask & (1 << self.n - i - 1):\n                        curr.append(self.characters[i])\n                self.bitmask -= 1\n                return "".join(curr)\n            else:\n                self.bitmask -= 1\n\n    def hasNext(self) -> bool:\n        return self.bitmask > (1 << self.k) - 1\n\n```
[]