Partition Equal Subset Sum
A medium-tier problem at 48% community acceptance, tagged with Array, Dynamic Programming. Reported in interviews at eBay and 11 others.
Partition Equal Subset Sum is a medium-difficulty problem that appears in real assessments at Microsoft, Walmart Labs, Visa, and eBay. About half of candidates pass it on first attempt. The catch: it looks like a greedy problem until you realize the greedy approach fails. You need to detect whether an array can split into two subsets with equal sum, which feels like an optimization problem but is actually a decision problem best solved with dynamic programming. If this problem hits your live OA and you panic on the pattern, StealthCoder solves it in seconds, invisible to the proctor.
Companies that ask "Partition Equal Subset Sum"
Partition Equal Subset Sum is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround.
Get StealthCoderThe trap is trying to sort and greedily balance. That fails immediately on cases like [1, 1, 3, 5]. The real solution treats this as a variant of the 0/1 knapsack problem: use a boolean DP table where dp[i] means 'can we make sum i using elements seen so far.' If the total sum is odd, return false instantly. Otherwise, populate the table by iterating through each element and updating reachable sums backward. The time complexity is O(n * target_sum), which is acceptable for most inputs. Common mistakes include updating the DP table forward instead of backward (which causes element reuse), or forgetting the odd-sum edge case. When you hit this live and feel stuck, StealthCoder has the working solution and explanation on screen in seconds.
Pattern tags
You know the problem.
Make sure you actually pass it.
Partition Equal Subset Sum recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Partition Equal Subset Sum interview FAQ
Is this still asked at big tech?+
Yes. Microsoft, Walmart Labs, Visa, and eBay all report it. About 48% acceptance rate means it's not trivial, but it's a known pattern. If you haven't drilled it, that's the risk.
What's the trick I'm missing?+
Greedy fails. You must use dynamic programming to track all possible sums. Think of it as 'can I build this target sum from a subset,' not 'how do I balance two piles.' The backward-iteration update is critical to prevent reusing elements.
How does this relate to knapsack?+
It's the 0/1 knapsack decision variant. Instead of maximizing value, you're asking 'does a subset sum to exactly half the total.' Same DP structure, different question.
What kills candidates on the live OA?+
Forgetting to update the DP table backward, forgetting the odd-sum check, and misunderstanding the target as 'half the array sum' rather than 'subset with sum equal to half.' These are all fixable once you see them.
How long should the solution take?+
The DP table fills in O(n * sum/2) time. For most arrays under 200 elements with sums under 200, you're under 50ms. The real time cost is understanding the pattern, not the runtime.
Want the actual problem statement? View "Partition Equal Subset Sum" on LeetCode →