Pregunta de entrevista de Amazon

Sort string without any repeating adjacent characters.