Pergunta de entrevista da empresa SLB

The problem involved the rearrangement of strings.