Design a Recoverable Iterator | xAI Interview Question