Pergunta de entrevista da empresa Amazon

String swapping with many constraints and many corner cases.