Search
⌘K

Leetcode 900. RLE Iterator

Create an iterator over a run-length encoded array that, on each next(n) call, consumes n elements by advancing through (count, value) pairs and returns the last value consumed or -1 if the sequence is exhausted. The solution must maintain state across calls and efficiently skip/consume counts (n can be large).

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early March, 2026

Google

Google

Junior

Your account is free and you can post anonymously if you choose.