Every Line on the Receipt
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
- L5
Interview Prompt
Point-of-sale transaction events arrive nested: each event has a `store_id`, a `timestamp`, and an `items` list of line items with an `item_name` and `item_price`. Flatten `events` into one record per line item that carries its parent's `store_id` and `timestamp`.
Summary
Nested deep inside the receipt. Pull every item out.
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