Maximum Bitwise AND After Increment Operations
Given an integer array nums and two integers k and m, perform at most k increment operations on any elements, then return the maximum possible bitwise AND of any subset of size m.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early October, 2026
Mid-level
You are given an integer array nums and two integers k and m. You may perform at most k operations. In one operation, you may choose any index i and increase nums[i] by 1. Return an integer denoting the maximum possible bitwise AND of any subset of size m after performing up to k operations optimally.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.