Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Assign car IDs to overlapping time intervals based on availability rules.
Reuse the smallest available car ID whenever a reservation ends before a new one starts.
Return the final assignments in the exact order of the input array.
What This Tests
Interval scheduling and event processing
Dynamic resource allocation using priority queues
Greedy decision making under constraints
Index preservation and data structure synchronization
Common Patterns
Heap / Priority Queue
Sorting
Greedy
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected