##
Bitwise and (or &) of a range
November 14, 2016

Given two non-negative long integers, x and y given x <= y, the task is to find bit-wise and of all integers from x and y, i.e., we need to compute value of x & (x+1) & … & (y-1) & y.7 Examples: Input : x = 12, y = 15 Output : 12 12… Read More »