Available question text
Implement an iterator over a run-length encoded sequence represented as an array of (count, value) pairs. Support a next(n) operation that exhausts the next n elements by advancing through the encoded pairs and returns the last element exhausted, or -1 if there are no more elements. The solution must maintain state across calls and efficiently handle large values of n by skipping/consuming counts without decoding the full sequence.
Related questions
Continue with questions that share topics or the same question type.
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
Google
LeetCode 900. RLE Iterator
Reported Mar 4, 2026 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source