Reported February 2024
Citadelgreedy

Min Equal Sum

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

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

You've got a Citadel OA coming in the next day or two, and Min Equal Sum is on the board. This is a math and greedy problem disguised as an array puzzle. Candidates report it's short to read but requires you to spot the optimization trick fast. The goal is to make array sums equal with minimum operations, and the trick sits in how you pick which elements to modify. StealthCoder can unblock you live if the greedy choice goes fuzzy.

Pattern and pitfall

Min Equal Sum hinges on recognizing that to equalize sums, you work backwards from the target: the smaller of the two array sums grows, the larger shrinks. You pick the largest unused elements from each array and reduce them greedily toward a midpoint. The pattern is greedy with a priority queue or sorting angle. Most candidates miss that you're not trying all possibilities; you're always picking the max from each side and collapsing inward. The operation count is your answer. When you're in the OA and your first instinct pulls you toward brute force or DP, that's the moment StealthCoder catches your pivot.

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 Min Equal Sum 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

⏵ The honest play

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

Citadel 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.

Min Equal Sum FAQ

Is Min Equal Sum actually a greedy problem?+

Yes. The core insight is that you always reduce the largest element from the array with the higher sum. You don't need to explore multiple reduction paths. Greedy gives you the minimum operation count directly.

What's the most common wrong approach?+

Trying to simulate all possible reductions or using dynamic programming to track states. Both are overkill. The problem collapses to a two-pointer scan from the largest elements downward.

How do I spot the target sum fast?+

The target is the midpoint where both arrays converge. Calculate total sums, divide by two (or work with the constraint that you're reducing one and growing the other). The math is simple once you see it.

Can this problem be solved in under 10 minutes?+

Yes, if you catch the greedy pattern immediately. Sorting both arrays and using a two-pointer collapse takes linear time after sort. Most slow submissions come from overcomplicating the logic.

Does Citadel ask follow-ups on Min Equal Sum?+

Reports suggest the base problem stands alone. Interviewers care that you recognize greedy, not that you optimize further. If you hit it during an OA, assume it's a straight solve and move on.

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

OA at Citadel?
Invisible during screen share
Get it