Pergunta de entrevista da empresa Google

Recursion and some bit logic problem