Pergunta de entrevista da empresa Prezi

Write a program, which inverts bits in a word, without inverting leading zeros.