You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add a solution to this problem in C++.
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
Kindly Assign it to me!!
The text was updated successfully, but these errors were encountered:
I would like to add a solution to this problem in C++.
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
Kindly Assign it to me!!
The text was updated successfully, but these errors were encountered: