Function to find the given number is a power of 2 or not?
Answer 2 Ms is correct and more efficient. because if a number is power 2 it is in form 1000---->8 100----->4 10------>2 like form subtract one from that and do with bitwise and it should be zero. ie 1000(8) & 0111(7)== 0