Pergunta de entrevista da empresa UBS

String manipulation and some bit problems.