Job role: Technology Developer FTE (Batch 2023)
Section 1 - Maximum OR (Coding, 20 mins)
Problem Statement: Given an array arr of n integers, in a single operation, choose any integer in the array and multiply it by 2.
Given arr and an integer num_operations, find the maximum bitwise OR of all the element of the array after performing the operations exactly num_operations times.
Example: n = 2, arr = [12, 9] and num_operations = 1
It is optimal to perform the operatino on 9 to get the array [12, 18]. The bitwise OR of the array is 1100 OR 10010 = 11110 which is the binary representation of 30, hence the answer is 30.