Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Resumable Iterator
Design an iterator that can pause and resume its execution state through get_state and set_state methods, extending support to handle multiple files and asynchronous operations. The implementation involves managing composite iterators that can run concurrently while maintaining their individual states. Handle asynchronous iteration using coroutines to enable non-blocking operations across multiple data sources.
Asked at:
OpenAI
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early October, 2025
OpenAI
Mid-level
Mid December, 2024
OpenAI
Senior
Design an iterator that can pause and resume its execution state through get_state and set_state methods, extending support to handle multiple files and asynchronous operations. The implementation involves managing composite iterators that can run concurrently while maintaining their individual states. Handle asynchronous iteration using coroutines to enable non-blocking operations across multiple data sources.
Comments
Currently 30% off
Hello Interview Premium
Your account is free and you can post anonymously if you choose.