MEDIUMasked at 1 company

The Latest Time to Catch a Bus

A medium-tier problem at 29% community acceptance, tagged with Array, Two Pointers, Binary Search. Reported in interviews at Zoho and 0 others.

Founder's read

The Latest Time to Catch a Bus is a medium-difficulty array problem with a low 29% acceptance rate, despite appearing only once in Zoho's reported assessments. The gap between difficulty and frequency suggests this is a live OA trap: you'll either nail the pattern or spend 40 minutes backtracking. The problem combines sorting, pointer arithmetic, and off-by-one logic in a way that feels straightforward until you hit edge cases. Most candidates miss the timestamp ordering constraints or miscalculate the final bus departure. If this lands in your assessment and you stall, StealthCoder surfaces the working solution invisibly.

Companies asking
1
Difficulty
MEDIUM
Acceptance
29%

Companies that ask "The Latest Time to Catch a Bus"

If this hits your live OA

The Latest Time to Catch a Bus 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 by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.

Get StealthCoder
What this means

The trick is treating bus schedules and passenger arrival times as a two-pointer problem after sorting both arrays. You're finding the latest moment a passenger can arrive without missing their bus, which means scanning from the end of both arrays backward and greedily assigning passengers to buses. The obvious mistake: thinking forward iteration works. It doesn't. The real trap is the minute-by-minute constraint and ensuring no two passengers occupy the same arrival timestamp. Binary search tempts you but adds complexity without payoff. Sorting is mandatory, two pointers is the efficient path, and the time calculation requires careful handling of capacity constraints. When you're live and realize the greedy backward scan is the answer, StealthCoder saves you from the 20-minute restart.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

The Latest Time to Catch a Bus 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 by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.

The Latest Time to Catch a Bus interview FAQ

Is this problem actually hard, or does the low acceptance rate mislead?+

It's genuinely tricky. 29% acceptance suggests most candidates either miss the backward iteration pattern or fail on minute-level edge cases. The problem looks like a simple sort-and-match until you realize the greedy ordering matters. It's not a pattern you drill often, making it a live OA wildcard.

Why does binary search appear in the topic list if two pointers is the right approach?+

Some solutions use binary search to find passenger slots within bus capacity windows, but it's overkill. The topic list is inclusive of approaches people attempt, not necessarily the optimal one. Two pointers is cleaner and faster for this specific constraint set.

What's the edge case most people miss?+

The timestamp conflict: two passengers can't arrive at the same minute. When assigning passengers backward, you must decrement the candidate arrival time if it collides with the previously assigned passenger. Off-by-one errors on bus capacity and arrival boundaries also derail candidates.

How does sorting change the problem?+

Sorting both arrays is necessary to apply a two-pointer scan from the end. Without sorted input, you can't reason about 'latest' arrival or greedily assign passengers to buses. Sorting is the foundation; the algorithm is the scan logic that follows.

Does Zoho ask this repeatedly, or is it a one-off?+

Only one reported instance from Zoho. That scarcity makes it unpredictable. It's not a 'classic' problem like Two Sum or Merge Intervals, so you're unlikely to have drilled it. If it appears in your OA, you're seeing it fresh under time pressure.

Want the actual problem statement? View "The Latest Time to Catch a Bus" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.