Available question text
Given an array of nonnegative integers and an upper bound, find the largest integer k (within the allowed range) such that k & num == 0 for every array element — i.e., choose bit positions that are zero in all numbers to maximize k under the constraint. This is a bitmask/greedy problem about identifying free bit positions and constructing the maximum valid bitset.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3125. Maximum Number That Makes Result of Bitwise AND Zero
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source