Morgan Stanley interview question

Rearrange characters in a String such that no two adjacent characters are same