Topic: Greedy Algorithm Problem / Level: intermediate

Problem: Given a string of lowercase letters, rearrange the characters so that adjacent characters are different and the string is lexicographically smallest.

Run the code to see the output here...