Pregunta de entrevista de Apple

The interviewer provides a ~300-line codebase and asks me to implement specific functions, debug existing logic, and reason about the code’s behavior and design trade-offs.