Maximum Remaining Drone Power
Reported by candidates from Akuna Capital's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Akuna Capital reported this one in September 2026, and the 4 x 4 grid looks too small to be dangerous. It's a min-cost path down a grid, dressed up as a drone problem. The trap is the framing: you want maximum power remaining, which means minimum total cost, then subtract from 100. Candidates who rush it either go greedy row by row or forget the final answer can go negative. If you blank during the live OA, StealthCoder runs invisibly on your desktop as a safety net, but this one is simple enough to own before you sit down.
The problem
You are given a 4 x 4 integer grid city, where city[i][j] is the power cost of passing through cell (i, j). A delivery drone starts with 100 units of power and must travel from the top row to the bottom row under these rules: It may start at any cell in the first row. From cell (i, j), it may move only to an existing cell in the next row: (i + 1, j - 1), (i + 1, j), or (i + 1, j + 1). It must end in the last row. Each time the drone passes through a cell, its power is reduced by that cell's cost. Return the maximum power remaining after the drone reaches the last row. Note: The final power can be negative. Function maxPower(city: int[][]) → int Examples Example 1 city = [[10, 20, 30, 40], [60, 50, 20, 80], [10, 10, 10, 10], [60, 50, 60, 50]] return = 0 Two possible paths are: (0, 0) -> (1, 1) -> (2, 2) -> (3, 3), which leaves 100 - 10 - 50 - 10 - 50 = -20 power. (0, 1) -> (1, 2) -> (2, 2) -> (3, 2), which leaves 100 - 20 - 20 - 10 - 50 = 0 power. The maximum possible remaining power is 0. Example 2 city = [[4, 16, 14, 21], [17, 0, 5, 5], [4, 41, 22, 3], [2, 51, 6, 0]] return = 90 The path (0, 0) -> (1, 1) -> (2, 0) -> (3, 0) has total cost 4 + 0 + 4 + 2 = 10, leaving 100 - 10 = 90 power. No valid path has a lower total cost. Constraints city has exactly 4 rows and 4 columns. 0 <= city[i][j] < 100
Reported by candidates. Source: FastPrep
Pattern and pitfall
The pattern is dynamic programming on a grid. Let dp[i][j] be the minimum cost to reach cell (i, j) from any cell in row 0. Row 0 is just the cell costs. For each later row, dp[i][j] = city[i][j] + min of dp[i-1][j-1], dp[i-1][j], dp[i-1][j+1], skipping columns that fall outside the grid. Answer is 100 minus the minimum of the last row. The pitfall is greedy: picking the cheapest neighbor at each step fails because a cheap cell can lead to expensive ones. Second pitfall is bounds on columns 0 and 3. Third, don't clamp the result at zero, since negative is allowed. Example 1 returns 0 and Example 2 returns 90, so trace both by hand. If the live OA rattles you, StealthCoder is the hedge that reads the problem and hands you the DP.
If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.
You can drill Maximum Remaining Drone Power 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 would have shipped this the night before his JPMorgan OA if he'd had it.
Get StealthCoderRelated leaked OAs
This OA pattern shows up on LeetCode as minimum falling path sum. If you have time before the OA, drill that.
You've seen the question.
Make sure you actually pass Akuna Capital's OA.
Akuna Capital reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Maximum Remaining Drone Power FAQ
How hard is the Akuna Capital Maximum Remaining Drone Power question really?+
Easy to medium. The grid is fixed at 4 x 4, so even brute force over all paths works. But the clean answer is a short DP, and the interviewers likely care that you reach it without fumbling edge columns or the sign of the result.
What's the trick to this problem?+
Flip the goal. Maximizing remaining power equals minimizing total path cost. Run a row-by-row DP where each cell stores the cheapest way to arrive, then return 100 minus the smallest value in the last row.
Can the answer really be negative?+
Yes. The problem states final power can be negative. Example 1 shows a path ending at -20. Don't clamp to zero or add a check that rejects paths. Just compute 100 minus the minimum total cost and return it.
Does a greedy approach work here?+
No. Taking the cheapest reachable cell each row can lock you into expensive cells later. Example 1 shows it: the best path goes through 20, 20, 10, 50 rather than starting at the cheapest first cell. Use DP so every option is considered.
How do I prepare for this in 48 hours?+
Write the min-cost-path DP from memory twice, with the three-neighbor move and column bounds checks. Then trace both examples by hand and confirm you get 0 and 90. Also try a variant with a larger grid so your code doesn't rely on 4 x 4.