HARDasked at 3 companies

Find Minimum Time to Finish All Jobs

A hard-tier problem at 44% community acceptance, tagged with Array, Dynamic Programming, Backtracking. Reported in interviews at PhonePe and 2 others.

Founder's read

Find Minimum Time to Finish All Jobs is a hard problem that shows up in interviews at PhonePe, Lyft, and Pinterest. You're given jobs with durations and need to distribute them across workers to minimize the maximum time any single worker spends. The naive greedy approach fails. This is a backtracking problem dressed up as optimization, and most candidates either get stuck on state representation or time out trying every permutation. If you hit this cold during your live OA and panic, StealthCoder surfaces a working solution in seconds, invisible to the proctor.

Companies asking
3
Difficulty
HARD
Acceptance
44%

Companies that ask "Find Minimum Time to Finish All Jobs"

If this hits your live OA

Find Minimum Time to Finish All Jobs 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. Built by a senior engineer who knows the OA is theater. This is the script.

Get StealthCoder
What this means

The trick is treating this as a bitmask DP problem where you explore which subset of jobs each worker takes, pruning aggressively. The obvious greedy sort-and-assign approach doesn't work because job order matters for load balance. You need to generate all possible job distributions (using backtracking and bitmask to track which jobs are assigned), compute the bottleneck (max worker time), and track the minimum bottleneck across all valid distributions. The hard part isn't the DP itself but recognizing you need both bitmask enumeration and pruning heuristics to avoid timeout. Most solutions that work combine backtracking to assign job subsets with bit manipulation to efficiently represent and iterate over job sets. StealthCoder is the hedge when the pattern doesn't click during the live assessment.

Pattern tags

The honest play

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

Find Minimum Time to Finish All Jobs recycles across companies for a reason. It's hard-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. Built by a senior engineer who knows the OA is theater. This is the script. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Find Minimum Time to Finish All Jobs interview FAQ

Is this really a dynamic programming problem or just backtracking with pruning?+

Both. You explore job assignments recursively (backtracking), but you can memoize states using bitmasks to avoid recomputing the same job subset assignments. The DP part is optional but makes solutions faster. Most accepted solutions use backtracking with aggressive pruning rather than pure DP.

What's the key insight most people miss?+

Greedy doesn't work. You can't just assign jobs in sorted order or round-robin. You need to try different subsets of jobs per worker and find the assignment that minimizes max time. This requires exploring the state space, not just making local optimal choices.

How do I represent the state without timing out?+

Use a bitmask to represent which jobs have been assigned. For each bitmask, try assigning the next available job subset to a new worker. Prune branches where the current worker's load already exceeds your best-known bottleneck. This keeps the search tree manageable.

Why is the acceptance rate only 43 percent?+

It's categorized as hard and requires multiple concepts working together: bitmask representation, backtracking exploration, and pruning logic. Candidates often get one part right but timeout, or they don't prune aggressively enough. The state space is large enough to punish inefficient solutions.

Is this still asked after being on LeetCode for years?+

Yes. PhonePe, Lyft, and Pinterest have all asked it. It tests both algorithmic insight (recognizing you need backtracking, not greedy) and implementation skill (bitmask handling, pruning). Companies like it because it separates candidates who understand state-space search from those who don't.

Want the actual problem statement? View "Find Minimum Time to Finish All Jobs" 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.