The Dynamic Container
A hard Python mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- Python
- Difficulty
- hard
- Seniority
- L4
Interview Prompt
You're implementing a dynamic array from scratch, managing your own backing storage that grows as elements are added. Replay the commands in `ops`, which are `['append', val]`, `['get', index]`, `['size']` and `['remove', index]`, and return the values the `get` and `size` commands produce.
Summary
Grow your own storage before the standard library does it for you.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write and run your Python against test cases
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision