Posts

Showing posts from August, 2021

Bit Manipulation

 To find no of set bits: num&(num-1) To find the rightmost set digit: num&(-num) num&~(num-1)