Reorganize String
Given a string s, rearrange the characters of s so that any two adjacent characters are not the same.
Return any possible rearrangement of s or return "" if not possible.
Example 1
Input
s = "aab"Output
"aba"The characters can be rearranged as
"aba", where no two adjacent characters are the same.Example 2
Input
s = "aaab"Output
""There is no way to rearrange
"aaab" so that no two adjacent characters are the same.Constraints
- 1 <= s.length <= 500
- s consists of lowercase English letters.