Beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public long maximumOr(int[] nums, int k) {\n        int len = nums.length;\n        long pre[] = new long[len + 1];\n        long suf[] = new long[len + 1];\n        long res = 0, pow = 1;\n        for(int i = 0; i < k; i++) {\n            pow *= 2;\n        }\n        pre[0] = 0;\n        for(int i = 0; i < len; i++) pre[i + 1] = pre[i] | nums[i];\n        \n        suf[0] = 0;\n        for(int i = len - 1; i >= 0; i--) suf[i] = suf[i + 1] | nums[i];\n        \n        for(int i = 0; i < len; i++) res = Math.max(res, pre[i] | (nums[i] * pow) | suf[i + 1]);\n        \n        return res;\n    }\n}\n```
['Iterator', 'Java']