Round 1
Questions: Given an array arr of positive integers and an integer val. We can perform the following operation on the given array at most once. The operation is as follows:
- choose two indices left and right that left <= right and right <= n (1-based indexing)
- For each value in the given range of indices left and right, bitwise xor each of them with m (m is a non-negative integer which you can choose as per your subarray). More formally nums[i] will change to (nums[i] xor m)
Find the maximum possible frequency of val after performing the operation at most once.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.