The Double-Ended Gateway
A medium 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
- medium
- Seniority
- L4
Interview Prompt
Build `MyDeque`, a queue we can add to, remove from and look at from either end without leaning on `collections.deque`, along with the `run_deque_ops(operations, args)` driver we use to replay a recorded session against it. A session always opens by constructing the deque, and each call's result lands at the same position in the list the driver returns.
Summary
Some queues let you skip the line from both ends.
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