AlgoHeist icon indicating copy to clipboard operation
AlgoHeist copied to clipboard

Minimum XOR ( C++ )

Open Ritika122001 opened this issue 1 year ago • 1 comments

I would like to add a solution to this problem in C++. Kindly Assign it!!

Given two positive integers num1 and num2, find the integer x such that: x has the same number of set bits as num2, and The value x XOR num1 is minimal. Note that XOR is the bitwise XOR operation. Return the integer x.

I/P : - num1 = 3, num2 = 5 O/P:- 3

Ritika122001 avatar Oct 03 '22 10:10 Ritika122001

i want to solve this .

shrutimeg avatar Oct 09 '22 17:10 shrutimeg