Amazon Interview Question

Sort string without any repeating adjacent characters.