Amazon interview question

Sort string without any repeating adjacent characters.