HARDasked at 2 companies

Maximum Running Time of N Computers

A hard-tier problem at 50% community acceptance, tagged with Array, Binary Search, Greedy. Reported in interviews at Deutsche Bank and 1 others.

Founder's read

Maximum Running Time of N Computers is a hard problem that Deutsche Bank and Flipkart have actually asked. You're given arrays of battery capacities and plug durations, and you need to find the longest time all N computers can run simultaneously. The trick isn't obvious on first read. Most candidates see it as a scheduling or simulation problem and build a complex state machine. That's the trap. The pattern is binary search plus greedy validation, and if you don't see it cold during an OA, StealthCoder runs invisible during screen share and surfaces the working solution in seconds.

Companies asking
2
Difficulty
HARD
Acceptance
50%

Companies that ask "Maximum Running Time of N Computers"

If this hits your live OA

Maximum Running Time of N Computers 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 Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE.

Get StealthCoder
What this means

The setup looks like it needs careful simulation: track each computer's power state, rotate plugs, manage timing. But the actual solution uses binary search on the answer combined with a greedy check. You binary search the target time, then for each candidate time, greedily verify whether it's achievable by assigning plugs optimally. The greedy part is the key insight: calculate the total available power and total required power over the duration, then determine if distribution is possible. Most candidates either over-engineer the simulation or miss that binary search applies here. When you hit this live and the simulation path crumbles, StealthCoder eliminates the blank by surfacing the binary search plus greedy pattern, letting you code and submit before the timer stresses you.

Pattern tags

The honest play

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

Maximum Running Time of N Computers 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. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Maximum Running Time of N Computers interview FAQ

Is this really a hard problem or are ratings inflated?+

Acceptance sits at 49.8%, genuinely hard territory. The binary search insight isn't intuitive if you haven't seen the pattern. Simulation-first thinking is natural and wrong, which tanks most attempts. It's legitimately tricky, not rating inflation.

Do Deutsche Bank and Flipkart actually ask this or is it just historical noise?+

Both companies have reported this problem in their hiring loops. It's not noise. If you're interviewing there, it's a real risk. That's exactly when StealthCoder pays for itself: one problem you didn't drill and suddenly it's live.

What's the core trick I need to internalize?+

Binary search on the answer time, then greedily validate feasibility by computing total power supply versus total power demand. The greedy allocation logic is the crux. Once you see it, the implementation flows. Before you see it, you're lost.

How does this relate to Array, Sorting, and Greedy topics?+

You sort battery/plug arrays to enable greedy assignment. The greedy choice is optimal power allocation within the binary search frame. Array manipulation and sorting set up the greedy feasibility check.

Will practicing simulation problems help me solve this?+

No. Simulation intuition will mislead you here. You need to recognize this as a binary search problem disguised as a resource-management puzzle. That pattern recognition either clicks or it doesn't under time pressure.

Want the actual problem statement? View "Maximum Running Time of N Computers" 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.