Reported September 2026
IBMmath

Plus Mult Array

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

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

IBM reported this one in September 2026, and the detail that trips people is right in the statement: multiply the first two values, then add, multiply, add, alternating down each subsequence. It looks like arithmetic on huge numbers, but you only care about parity. Split by index, evaluate each half mod 2, compare the two bits. It's an array problem with a math trick hiding in it. If the OA clock is ticking and your mind goes blank on the mod handling, StealthCoder runs invisibly on screen as a safety net. You probably won't need it once you see the shortcut.

The problem

Given an integer array A, split its elements by zero-based index into an even-index subsequence A[0], A[2], A[4],... and an odd-index subsequence A[1], A[3], A[5],....
Evaluate each subsequence from left to right. Multiply its first two values, add the third value, multiply by the fourth value, add the fifth value, and continue alternating addition and multiplication. Let R_even be the even-index result modulo 2, and let R_odd be the odd-index result modulo 2. Normalize each remainder to either 0 or 1, including when the evaluated expression is negative.
Return the array classification according to these rules:
Return "ODD" when R_odd > R_even.
Return "EVEN" when R_even > R_odd.
Return "NEUTRAL" when R_even = R_odd.

Function
plusMultArray(A: int[]) → String

Examples
Example 1
A = [12,3,5,7,13,12]
return = "NEUTRAL"
For the even indices, R_even = (12 × 5 + 13) mod 2 = 73 mod 2 = 1. For the odd indices, R_odd = (3 × 7 + 12) mod 2 = 33 mod 2 = 1. The two remainders are equal, so the result is "NEUTRAL".
Example 2
A = [0,1,0,1,0,1,0,1,0,1]
return = "ODD"
The even-index subsequence is [0,0,0,0,0], whose alternating result is 0. The odd-index subsequence is [1,1,1,1,1], whose result is (((1 × 1) + 1) × 1) + 1 = 3, so R_odd = 1. Therefore the classification is "ODD".

Constraints
10 ≤ A.length ≤ 10^5
-10^9 ≤ A[i] ≤ 10^9

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick: never compute the real value. Products and sums overflow fast with 10^5 elements, but parity is preserved under addition and multiplication, so reduce every element mod 2 first and keep a running bit. Start with the first element's parity, then for each next element alternate: multiply (AND of bits) or add (XOR of bits). Normalize negatives with ((x % 2) + 2) % 2, since languages like Java and C++ return -1 for negative odd numbers. The common pitfall is getting the operation order wrong. The first step is a multiply, then add, then multiply. Another is mishandling a subsequence with a single element, though the constraints give you at least 10 elements, so each half has at least 5. Then compare R_odd and R_even and return the string. It's one pass, O(n) time, O(1) space. If the live OA freezes you on the negative-modulo detail, StealthCoder is the hedge that gets you a working solution.

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 Plus Mult Array 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 IBM's OA.

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

Plus Mult Array FAQ

How hard is Plus Mult Array really?+

Easy once you spot the parity shortcut. The statement looks scary because of the alternating operations and 10^9 values, but it's a single linear pass with bits. The only real risk is a sloppy implementation of negative modulo or the operation order.

What's the trick for the IBM Plus Mult Array question?+

Reduce everything mod 2 up front. Addition becomes XOR and multiplication becomes AND on parity bits. That removes overflow entirely, so you carry a single bit through each subsequence and compare the two final bits.

How do I handle negative numbers in the modulo?+

Normalize with ((x % 2) + 2) % 2, or use x & 1 in languages with two's complement integers. In Java or C++, -3 % 2 gives -1, which breaks your comparison. The statement explicitly says to normalize to 0 or 1, so test a negative case.

Which operation comes first in each subsequence?+

Multiplication. You multiply the first two values, add the third, multiply by the fourth, add the fifth, and keep alternating. So with index i starting at 1 within the subsequence, odd i means multiply and even i means add. Check this against Example 1: 12 x 5 + 13.

How do I prepare for this in 48 hours?+

Write the solution once from scratch and run both examples by hand. Then test a negative-number case and an all-zeros case. Practice the habit of asking whether only parity matters before computing big values. That instinct covers many similar OA array questions.

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

OA at IBM?
Invisible during screen share
Get it