Apply Operations on Array to Maximize Sum of Squares at Sprinklr

Hard44.2% acceptance

This problem has 87.5% frequency at Sprinklr.

Problem Description

You are given a **0-indexed** integer array `nums` and a **positive** integer `k`. You can do the following operation on the array **any** number of times: * Choose any two distinct indices `i` and `j` and **simultaneously** update the values of `nums[i]` to `(nums[i] AND nums[j])` and `nums[j]`...

Read full problem and hints

Topics


More Sprinklr Questions

View all Sprinklr questions