Bit Manipulation

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


Comments

Popular posts from this blog

DP-Fibonacci Memoisation