FastPrepPlus Mult Array
Problems/Plus Mult Array

Plus Mult Array

IBM logoIBM● EasyINTERNNEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an IBM intern or new grad online assessment. The report gives the formulas, the sorting rules, a sample and the constraints. Our version follows the screenshot and the sample, where both index groups start with multiplication. The caption says something different about the odd group, and we do not use it. The printed lower bound is 10, even though the example in the report has 6 elements. Our inputs follow the printed bound, and we keep that example only as an illustration. We made the function interface clear and fixed how negative remainders work, so results are always the same. Our version is about 95% the same as the reported question.

Special thanks: 🌷 A special thank you to our lovely, amazing frenz who shared that this question appeared again on September 9, 2026! ദ്ദി ˉ͈̀꒳ˉ͈́ )✧ 💜

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

More IBM Online Assessment questions

  • Missing IntervalsOA · Seen Nov 2026
  • Last Object Exit TimeOA · Seen Nov 2026
  • Count Peaks and ValleysOA · Seen Nov 2026
  • Count Strictly Increasing Contiguous WindowsOA · Seen Nov 2026
  • Total Each Letter's Count in an Encoded StringOA · Seen Nov 2026
  • Count Servers With No Requests in a Time WindowOA · Seen Nov 2026
  • Maximum Easy Tasks After RearrangingOA · Seen Nov 2026
  • Tree Pythagorean TriplesOA · Seen Oct 2026
  • Minimum Power-of-Two Removal OperationsOA · Seen Oct 2026
  • Maximum Compatible Time WindowsOA · Seen Oct 2026

Similar questions at other companies

  • Basic Item DiscountsPalantir · OAPalantir interview questions
  • Diagonal Bounce TraversalAutodesk · OAAutodesk interview questions
  • Costliest ChocolateRippling · OARippling interview questions
  • Online No-Intercept Linear RegressionTwo Sigma · OATwo Sigma interview questions
  • Progressive Tax CalculatorInteractive Brokers · OA
  • 2020 Account Balance with Monthly Card FeesDRW · OADRW interview questions
  • Array Challenge (QR Intern)Akuna Capital · OAAkuna Capital interview questions
  • Latency Bucket CounterDatadog · OA · PHONE SCREENDatadog interview questions
  • First Fibonacci Number at Least the Array SumBitGo · OABitGo interview questions
  • Metro Fare With a Daily CapMicrosoft · OAMicrosoft interview questions

IBM interview experiences

  • IBM Full-Time SWE OA Questions: 1 Experience
  • IBM Software Intern Résumé Rounds: 2 Experiences (Part 3 of 3)
  • IBM Intern Blitz Interviews: 23 Experiences (Part 2 of 3)
  • IBM Software Intern Interviews: 44 Experiences (Part 1 of 3)
  • IBM Software Intern Interview Questions: 15 Experiences
All IBM interview questionsSee IBM hiring insights
Saved
class Solution {
    public String plusMultArray(int[] A) {
      // Write your code here
    }

}
Checking account…