Pergunta de entrevista da empresa Groupon

Bit manipution & an algorithm question about string.