Available question text
Given num1 and num2, find an integer x with the same number of set bits as num2 that minimizes num1 XOR x. This reduces to placing x's 1-bits to match num1's 1-bits as much as possible (favoring higher-significance positions) and filling remaining bits in the least-significant positions to minimize the XOR.
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 2429. Minimize XOR
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source