Car Pooling
Medium
Intervals & Line Sweep
A car with a given capacity drives in one direction. Each trip has a number of passengers, a pickup location and a drop-off location. Print true if all trips can be completed without ever exceeding the capacity, otherwise false.
Constraints
1 <= n <= 1000 0 <= from < to <= 1000
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.