Pergunta de entrevista da empresa Goldman Sachs

Implement a circular array, find whether a number is power of 2 in constant time.

Resposta da entrevista

Sigiloso

9 de set. de 2017

I did the circular array by using three variables read, write and circulated. The power of two can be checked by n&(n-1)==0.