Search
⌘K

Leetcode 2680. Maximum OR

Given an array and up to k doublings (multiply an element by 2 each time), maximize the bitwise OR of all elements by choosing where to apply the operations; the core challenge is selecting which element(s) to shift to set the most significant bits (n up to 1e5, k ≤ 15) and computing the resulting OR efficiently.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.