There are 3 integers a, b, w.
There are 2 equations –
w+a=b
a (bitwise AND) b = 0;
I was given the value of w and he asked me to calculate the number of pairs (a, b) satisfying the two equations.
Interview Question
There are 3 integers a, b, w.
There are 2 equations –
w+a=b
a (bitwise AND) b = 0;
I was given the value of w and he asked me to calculate the number of pairs (a, b) satisfying the two equations.