Python3 using binary numbers with n bits set and sorting
\nclass CombinationIterator:\n\n    def __init__(self, arr: str, n: int):\n        self.arr = arr\n        self.n = n\n        self.m = len(arr)\n        self.c
```\nclass CombinationIterator:\n\n    def __init__(self, arr: str, n: int):\n        self.arr = arr\n        self.n = n\n        self.m = len(arr)\n        self.combs = [self.getComb(i) for i in range(1<<self.m) if self.bitcount(i) == self.n]\n        self.combs.sort()\n        \n    def bitcount(self, x):\n        c = 0\n        while x > 0:\n            c += (x & 1)\n            x = x >> 1\n        return c\n    \n    def getComb(self, comb):\n        s = ""\n        for i in range(self.m):\n            if (comb & 1):\n                s += self.arr[i]\n            comb = comb >> 1\n        return s\n    \n    def next(self) -> str:\n        return self.combs.pop(0)\n\n    def hasNext(self) -> bool:\n        return len(self.combs) > 0\n\n# Your CombinationIterator object will be instantiated and called as such:\n# obj = CombinationIterator(characters, combinationLength)\n# param_1 = obj.next()\n# param_2 = obj.hasNext()\n```
[]