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 hintsTopics
More Sprinklr Questions
Create Components With Same ValueHardMinimum Edge Weight Equilibrium Queries in a TreeHardNumber of Great PartitionsHardApply Bitwise Operations to Make Strings EqualMediumNext Greater Numerically Balanced NumberMedium
View all Sprinklr questions