Pregunta de entrevista de UBS

String manipulation and some bit problems.