Reported February 2026
Googleprefix sum

Pivot Index After Exactly One Removal

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

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

The Google OA reported in February 2026 sounds like a twist on array manipulation, but it's the classic pivot index problem wearing a costume. The "remove exactly one element" wording is a distraction. You're checking whether any index has equal sums on its left and right. Prefix sums solve it in one pass. If the wording rattles you and your mind goes blank mid-assessment, StealthCoder sits invisibly on your screen as a safety net and hands you the approach in real time. Most candidates won't need it once they see the reduction.

The problem

Given an integer array nums, choose exactly one index i and remove nums[i].
Return true if there is a choice of i for which the sum of the elements strictly before i equals the sum of the elements strictly after i:
sum(nums[0.. i - 1]) = sum(nums[i + 1.. n - 1])
The equality is checked around the removed element's original position. Do not search for a different pivot in the shortened array.

Function
canCreatePivot(nums: int[]) → boolean

Examples
Example 1
nums = [2,1,3,1,2]
return = true
Remove nums[2] = 3. The left sum is 2 + 1 = 3, and the right sum is 1 + 2 = 3.
Example 2
nums = [1,2,3]
return = false
No removal position has equal sums on its two original sides.
Example 3
nums = [-5,4,-5]
return = true
Remove the middle value 4. Both side sums are -5.

Constraints
1 <= nums.length <= 200000.
-1000000000 <= nums[i] <= 1000000000.
Use signed 64-bit arithmetic for all sums.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick: removing nums[i] changes nothing about the two sides, because the equality is checked around the original position. So the question is just whether some i satisfies left sum == total - left sum - nums[i]. Compute the total once. Walk the array keeping a running left sum. At each index, check left == total - left - nums[i]. Return true on the first match. That's O(n) time and O(1) space. The pitfalls are real, though. Don't build a shortened array and hunt for a new pivot, since the statement forbids it. Use 64-bit sums, because 200000 values near 1e9 overflow 32 bits. Handle n = 1, where both sides are empty and the answer is true. Negatives don't break anything, so skip any sliding window or early-exit tricks. If you freeze on the rewording during the live OA, StealthCoder is the hedge that gets you to the prefix-sum loop fast.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Pivot Index After Exactly One Removal 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. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as find pivot index. If you have time before the OA, drill that.

⏵ The honest play

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

Google reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Pivot Index After Exactly One Removal FAQ

How hard is this Google OA question really?+

Easy once you strip the wording. It's the pivot index problem with a removal story attached. One pass with a running left sum and a precomputed total solves it. The difficulty is mostly in not overthinking the removal and in remembering 64-bit arithmetic.

What's the trick to solving it?+

Realize that removal doesn't change the side sums. The left and right sums are taken around the original index. So check left == total - left - nums[i] for each i. No array rebuilding, no second pass, no hash map needed.

What edge cases should I test?+

Test a single element, which returns true because both sides sum to zero. Test negatives like [-5,4,-5]. Test all zeros. Test huge values near 1e9 with length 200000 to confirm you aren't overflowing. Also test a case where no index works, like [1,2,3].

Does integer overflow actually matter here?+

Yes. The total can reach about 2e14, far past 32-bit range. In Java or C++ use long. Python handles it natively. The statement explicitly calls for signed 64-bit sums, so a hidden test almost certainly checks it.

How do I prepare for this in 48 hours?+

Practice prefix-sum problems until the running-sum-plus-total pattern is automatic. Write the pivot loop from memory twice. Then rehearse reading a problem for what it reduces to instead of what it says. That habit matters more than memorizing this one question.

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

OA at Google?
Invisible during screen share
Get it