Pergunta de entrevista da empresa IBM

Write a function that accepts an integer and returns a boolean which will be true when the given number is a power of 2.

Resposta da entrevista

Sigiloso

7 de abr. de 2019

x&(x-1) should do it if number is not 0