Reported April 2024
Amazondynamic programming

Get Min Time

Reported by candidates from Amazon's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Amazon OA. Under 2s to a working solution.
Founder's read

Amazon's 'Get Min Time' question hit the assessment in April 2024, and it's testing whether you can optimize under constraints. The problem is short enough to blank on if you're tired, which is exactly why you need a concrete pattern in your back pocket. This is a classic optimization problem where the naive solution times out. StealthCoder runs silently during your OA and can feed you the pattern when your brain stalls on the live problem.

Pattern and pitfall

Without the full problem text, the pattern here is almost certainly dynamic programming or a greedy/binary search hybrid to find minimum time. Amazon loves these optimization questions because they separate candidates who think linearly from those who can spot when a brute force attempt will fail. The trick is usually recognizing that you can't just sum costs or iterate naively. You either need to build up state (DP), or binary search on the answer and validate feasibility. Common pitfall: assuming the first valid solution is optimal. The real answer often requires searching through a solution space or computing a recurrence. StealthCoder's value on test day is catching which category the problem falls into when you're under pressure.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill Get Min Time cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Amazon's OA.

Amazon reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Min Time FAQ

Is this a DP or greedy problem?+

Amazon's 'Get Min Time' is almost certainly DP or binary search plus validation. If you're asked to minimize time subject to constraints, don't iterate naively. Check if you can binary search on the answer, then verify feasibility, or if you need to build up state with DP memoization.

What's the most common mistake candidates make?+

Assuming a greedy step works without proving it. For example, picking the fastest option at each step doesn't guarantee global minimum time. Validate your approach against a small example before submitting.

How do I prepare in 48 hours if I've never seen this?+

Solve two Amazon medium-hard optimization problems: one binary search, one DP. Understand the difference in when to apply each. If the problem has a clear 'check if feasible in X time' function, binary search is likely. If you need to compute best outcome recursively, DP.

Will I have time to code a full DP solution live?+

Yes, if you've written DP twice before. The structure is usually 15-25 lines once you've identified the state. If you blank, StealthCoder can outline the approach so you don't stall.

Should I optimize or just get it working first?+

Optimize from the start. Amazon expects efficiency on these problems. A brute force that works on small examples will fail the hidden test cases. Know your pattern before you code.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Amazon.

OA at Amazon?
Invisible during screen share
Get it