Rearrange string such that no two adjacent characters are same


This is a companion discussion topic for the original entry at http://iq.opengenus.org/rearrange-string-no-same-adjacent-characters/