342. Power of Four
# Easy
Two methods: 第二种方法是技巧型,很难想出来
loop
bit manipulate according to #Power of Two. If num & (num-1) = 0, then num is power of two. If num is power of two and (num-1)%3 = 0, then num is power of four.
Last updated
# Easy
Two methods: 第二种方法是技巧型,很难想出来
loop
bit manipulate according to #Power of Two. If num & (num-1) = 0, then num is power of two. If num is power of two and (num-1)%3 = 0, then num is power of four.
Last updated