Loading...
The Stream Joiner
A hard Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- hard
- Seniority
- senior, staff
Problem
Two sensor streams produce readings at slightly different times, and the correlation engine needs to pair them up by closest timestamp within a tolerance window. Write a function that joins two sorted event streams, matching each event from stream A to the nearest event in stream B within the allowed time difference.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.