Easy Python Solution
IntuitionWe compute the prefix OR and suffix OR for the array, then iterate through each element, applying k operations to maximize the result.The above strateg
# Intuition
We compute the prefix OR and suffix OR for the array, then iterate through each element, applying k operations to maximize the result.

The above strategy kicks in through the fact that the optimal approach is to apply all k operations to a single number (why?).

# Code
```python3 []
class Solution:
    def maximumOr(self, nums: List[int], k: int) -> int:
        n = len(nums)

        if n == 1:
            return nums[0] * (2 ** k)
            
        pre, suf = [0] * n, [0] * n
        pre[0], suf[n - 1] = nums[0], nums[n - 1]

        for i in range(1, n):
            pre[i] = nums[i] | pre[i - 1]
        
        for i in range(n - 2, -1, -1):
            suf[i] = nums[i] | suf[i + 1]

        res = -inf
        for i in range(n):
            new_num = nums[i] * (2 ** k)
            if i == 0:
                res = max(res, new_num | suf[i + 1])
            elif i == n - 1:
                res = max(res, new_num | pre[i - 1])
            else:
                res = max(res, pre[i - 1] | new_num | suf[i + 1])
        
        return res
```
['Python3']