A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L5
Problem
Given events as a list of [name, start, end], return all pairs [name_a, name_b] where the two events overlap in time (name_a's interval and name_b's interval share at least one instant). Intervals are half-open [start, end): an event ending exactly when another starts does not overlap. Each pair appears exactly once with name_a's interval starting no later than name_b's. Sort output by (start of name_a, start of name_b).
Summary
Overlapping events. The calendar knows.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.