The First of Their Kind
A easy Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L3
Interview Prompt
An ingestion feed hands you records in arrival order, and the same `key` value can show up more than once whenever an upstream producer retries. Collapse the feed so that for each distinct value of `key`, only the record that arrived first survives, with the survivors left in their original order. Records that carry no `key` field have nothing to collapse against, so pass every one of them through untouched.
Summary
When the same record arrives twice, only the first one survives.
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