Pregunta de entrevista de Google

String operation and bit manipulation problem.