Available question text
Implement an iterator that, given a sorted string of distinct lowercase letters and an integer k, returns all length-k combinations in lexicographic order via next() and hasNext(). The iterator must efficiently maintain state for up to characters.length ≤ 15 and at most 10^4 calls, producing each combination on demand.
Related questions
Continue with questions that share topics or the same question type.
- Binary Search Tree Iterator
Coding
- Binary Search Tree Iterator II
Coding
- Combination Sum
Coding
- Combination Sum II
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1286. Iterator for Combination
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source