##
Count smaller values whose XOR with x is greater than x
March 26, 2017

Given a long integer ‘x’, find the number of values of ‘a’ satisfying the following conditions: a XOR x > x 0 < a < x Examples: Input : x = 10 Output : 5 Explanation: For x = 10, following 5 values of ‘a’ satisfy the conditions: 1 XOR 10 = 11 4 XOR… Read More »