Reported October 2024
Amazongreedy

Get Max Programs

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 Max Programs question hits you with a deceptively simple premise: find the maximum number of programs you can attend given constraints on time, overlap, or resources. Candidates report this in October 2024 and often blank on the optimization angle. The trick isn't complex logic, it's recognizing you need a greedy or dynamic-programming approach to pack the most programs in. If you freeze during the live OA, StealthCoder reads the exact constraint structure and surfaces the pattern in real time, so you're never stuck staring at the problem statement.

Pattern and pitfall

Without the full problem text, the likely structure is an interval-scheduling or activity-selection problem where you maximize the count of non-overlapping programs. If it's greedy, you sort by end time and pick programs that don't conflict. If it's DP, you're either filling a time budget or computing states based on program dependencies. The common pitfall is sorting wrong (start time instead of end time) or not recognizing that a greedy sort-and-pick strategy works at all. Many candidates overthink and try brute force. During the assessment, if you can't recall the exact strategy, StealthCoder will show you the pattern instantly, letting you code with confidence instead of guessing.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Get Max Programs 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 by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as non overlapping intervals. If you have time before the OA, drill that.

⏵ The honest play

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

Amazon reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Max Programs FAQ

Is this an interval-scheduling problem?+

Very likely. If the problem involves selecting programs with times and you want to maximize count, you're doing activity selection. Sort by end time, then greedily pick non-overlapping programs. This is a classic greedy win.

What's the most common mistake candidates make?+

Sorting by start time instead of end time, or not sorting at all. Also overthinking with DP when greedy is faster and correct. The simpler approach is usually right here.

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

Study activity selection and interval scheduling. LeetCode's 'Non-overlapping Intervals' and 'Interval Scheduling' cover the core idea. One pass is enough to unlock the pattern.

Does this problem require DP or is it pure greedy?+

Greedy is the standard solution for max-count interval problems. If there's a twist like weighted programs or dependencies, DP might appear, but the problem title suggests pure count optimization.

What languages does Amazon test this in?+

Typically Java, Python, or C++. Your choice. The algorithm is language-agnostic, so focus on the pattern, not syntax. Your familiar language is fastest.

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