Maximize the bitwise AND of k elements with an increment budget

0
Remix

You get an array of non-negative integers, an integer k and a budget c. You may add amounts to elements as long as the total added over all elements is at most c. Then choose k elements. Return the largest possible bitwise AND of the chosen elements.

AmazonOnline assessmentLast asked Sep 2026
No answer yet. Write the first one; the best answer gets endorsed.