NeetCode #545LC-1094MediumHeap / Priority QueueNC 250
← Back to All Problems#545 · #1094 · Car Pooling(拼车)
📌 Problem Statement & Constraints
A car travels east;
trips[i] = [numPassengers, from, to] describes a trip. Given capacity, return whether all trips can be completed without exceeding it. Constraints: 1 <= trips.length <= 1000, 0 <= from < to <= 1000, 1 <= capacity <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!