Dsa
Intervals
Warm-up
Resource Allocation Timeline
You are managing resource allocation over time and need to check if any resources are double-booked based on their allocated time intervals. Each allocation is represented by a start and an end time. Your task is to determine if there are any overlaps among the resource allocations. Return 'Double Booked' if there is at least one overlap, otherwise return 'Clear Schedule'.
Input format:
A single line of space-separated integers representing start and end times of allocations (e.g., '1 3 3 5 6 8').
Output format:
Return 'Double Booked' or 'Clear Schedule'.
Example:
Input:
1 3 3 5 6 8
Output:
Double Booked
Key concepts
intervalsallocationresources
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now