Can anyone help what n&-n means?? And what is the significance of it.
n&-n
As @aestrivex has mentioned, it is a way of writing 1.Even i encountered this
for (int y = x; y > 0; y -= y & -y)
and it just means y=y-1 because 7&(-7) is x00000111 & x11111001 = x00000001 = 1