# 字母组合迭代器
请你设计一个迭代器类,包括以下内容:
characters(该字符串只包含小写英文字母)和一个数字 combinationLength 。combinationLength 的下一个字母组合。combinationLength 的下一个字母组合时,才返回 True;否则,返回 False。
示例:
CombinationIterator iterator = new CombinationIterator("abc", 2); // 创建迭代器 iterator
iterator.next(); // 返回 "ab"
iterator.hasNext(); // 返回 true
iterator.next(); // 返回 "ac"
iterator.hasNext(); // 返回 true
iterator.next(); // 返回 "bc"
iterator.hasNext(); // 返回 false
提示:
1 <= combinationLength <= characters.length <= 1510^4 次函数调用。next 时都存在下一个字母组合。以下错误的选项是?
## aop ### before ```cpp ``` ### after ```cpp ``` ## 答案 ```cpp ``` ## 选项 ### A ```cpp ``` ### B ```cpp ``` ### C ```cpp ```