Iterator for Combination

Design an iterator that provides combinations of a specified length from a character sequence. Support hasNext() and next() operations.

Examples
Input: ["abc",2,["next","hasNext","next","hasNext","next","hasNext"]]
Output: ["ab",true,"ac",true,"bc",false]
Hints

Iterator for Combination

Design an iterator that provides combinations of a specified length from a character sequence. Support hasNext() and next() operations.