Description
This problem was asked by Flexport.
Given a string s
, rearrange the characters so that any two adjacent characters are not the same. If this is not possible, return null.
For example, if s = yyz
then return yzy
. If s = yyy
then return null
.
Kotlin Solution
TBD