Car Pooling
A medium-tier problem at 56% community acceptance, tagged with Array, Sorting, Heap (Priority Queue). Reported in interviews at Zepto and 5 others.
Car Pooling hits your OA and you blank. You're staring at ride requests, pickup and dropoff points, and a van with limited capacity. Lyft, Meta, and Goldman Sachs ask this. The trap: thinking greedy or sorting wrong. Most candidates fail on the simulation logic or miss that you're checking feasibility at each step, not just packing passengers. If you haven't drilled the sequence of pickup and dropoff events, StealthCoder solves it in seconds during your assessment. 56% acceptance rate means it's not trivial, but it's not a DSA nightmare either.
Companies that ask "Car Pooling"
Car Pooling is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoderThe trick is treating pickups and dropoffs as discrete events on a timeline. Sort all events by location, then simulate the van moving through them in order. At each pickup, you must have capacity; at each dropoff, release seats. The gotcha: naive sorting fails because you need to handle same-location pickups before dropoffs, or dropoffs before pickups depending on logic. Many candidates try greedy passenger selection and tank. The Array, Simulation, and Prefix Sum elements mean you might precompute cumulative passenger counts or track van state. This is where pattern recognition matters. If the interview hits you with a variant you haven't seen, StealthCoder runs invisibly and surfaces a working solution so you stay composed and don't burn time reverse-engineering on the fly.
Pattern tags
You know the problem.
Make sure you actually pass it.
Car Pooling recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Car Pooling interview FAQ
Is this really asked at Lyft and Meta?+
Yes. Lyft especially, given their platform. Meta and Goldman Sachs also report it. It's a medium-difficulty check for your simulation and sequencing logic, not a hard problem, so both companies use it as a screener. Acceptance rate is solid enough that a clear solution passes.
What's the actual trick I'm missing?+
You need to sort events by location and simulate passenger state at each stop. Don't try greedy passenger selection or random ordering. The problem is checking feasibility at every single pickup, not optimizing routes. Once you see that it's a simulation problem masquerading as a scheduling problem, the approach clicks.
How does Heap or Priority Queue apply?+
If you want to track which passenger to drop off first (e.g., earliest destination), a max-heap works. But many solutions don't need it. Heap becomes useful if the variant asks you to optimize dropoffs or handle tie-breaking. Check the constraint; sometimes it's overkill.
Does this relate to other Array or Simulation problems?+
Yes. The event-sorting pattern shows up in meeting room scheduling and interval problems. If you know how to merge intervals or sort by endpoint, you've got half the foundation. Simulation logic is pure state management, which scales to harder OA problems later.
What if I hit this cold and forget the pattern?+
Walk through a small example by hand: one pickup at mile 0, one dropoff at mile 5. Then add a second ride. Trace van capacity at each stop. That manual trace is the simulation. From there, sorting and checking feasibility become obvious. If you blank entirely, StealthCoder runs invisibly and unblocks you.
Want the actual problem statement? View "Car Pooling" on LeetCode →