Reported March 2026
Amazongreedy

Make Power Non Decreasing

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 "Make Power Non Decreasing" problem showed up in March 2026 OAs, and it's testing whether you can spot the greedy choice under time pressure. You're given an array of numbers, and you need to make it non-decreasing by modifying elements in some constrained way. The catch isn't the definition. It's knowing which element to change and how much. This is where StealthCoder acts as your safety net if you blank on the exact greedy strategy during the live assessment.

Pattern and pitfall

The core pattern here is greedy with a touch of backward iteration. You scan the array from right to left, and whenever you find an element that's larger than the next one, you decide whether to reduce it or increase the next one. The trick is that the cost or constraint of each choice pushes you toward one answer. Most candidates try greedy forward, which leads them astray. The real move is to work backward and commit to the smallest valid adjustment at each step. StealthCoder reads the problem and constraints in real time, so if you freeze on whether to modify element i or i+1, it gives you the pattern instantly without raising flags during screen share.

Drill it cold or hedge it with StealthCoder. Either way, don't walk into the OA hoping you remember the trick.

If this hits your live OA

You can drill Make Power Non Decreasing 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. Made for the candidate who got the OA invite this morning and has 72 hours, not six months.

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. Made for the candidate who got the OA invite this morning and has 72 hours, not six months. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Make Power Non Decreasing FAQ

What does 'make non decreasing' mean here, and is there a modification limit?+

You need array[i] <= array[i+1] for all positions. The problem likely specifies a constraint like you can divide by 2, or add/subtract a fixed amount, or change once per element. Read the constraints carefully. That constraint is what makes the greedy choice obvious.

Do I modify left to right or right to left?+

Right to left. Work backward from the end. If array[i] > array[i+1], you've found a violation. At that point, decide: adjust i down or i+1 up. Backward ensures you never undo earlier choices, which saves you from O(n^2) rethinking.

What's the trick Amazon is testing here?+

They want to see if you recognize that greedy works and that backward iteration with a single pass is sufficient. The trap is overthinking it as dynamic programming or trying to minimize total cost with a complex optimization. It's not. One clean pass backward solves it.

How do I prepare for this in 24 hours if I'm not sure on the exact greedy rule?+

Focus on the constraint given in the problem statement. That constraint defines which move is cheaper or forced. Walk through a small example by hand, decide what to change, and confirm the pattern holds. Then code it backward. That's it.

Is this still being asked at Amazon, or is it a one-off?+

Greedy array modification problems are Amazon's bread and butter, especially ones that hinge on iterating backward or spotting the forced choice. The title suggests it's newer, so expect similar variants. The pattern is stable.

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