What the Night Changed
A hard Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- hard
- Seniority
- L5
Interview Prompt
A nightly job dumps a dimension table to a `list[dict]` and hands you two of them: `old_snapshot` from yesterday's run and `new_snapshot` from today's, where each row carries an `id_field` key that identifies it across runs. Return a dict that splits the differences into `inserts` (ids seen only today), `deletes` (ids gone since yesterday), and `updates` (ids present in both runs whose other fields moved), with every bucket sorted by `id_field` ascending.
Summary
Two photographs of the same table, a day apart. Account for everything that moved.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision