Resumable Iterator with Save / Restore State
Asked at xAI · Coding Questions · Difficulty: Medium · Last asked Apr 2, 2026
Design and implement an iterator that can persist its position to a checkpoint and resume from that checkpoint later, including across process restarts. The bar is a clean state model + correct boundary semantics on the resume path; the follow-up extends to nested iterators (iterator-of-iterators).
Loading the problem…