Who Came First
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- mid
Problem
An upstream feed hands you member IDs in the exact order they were scanned during a shift, and the same member often gets scanned several times. Collapse the feed so each member appears once, in the position it was first seen.
Summary
The feed repeats itself. Keep each member only the first time it speaks.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.