You are given a 0-indexed integer array
numsof lengthnand an integerk. In an operation, you can choose an element and multiply it by2.Return the maximum possible value of
nums[0] | nums[1] | ... | nums[n - 1]that can be obtained after applying the operation on nums at mostktimes.Note that
a | bdenotes the bitwise or between two integersaandb.
1 | class Solution { |