You are given an alphanumeric string s consisting of lowercase English letters and digits.
Rearrange the characters of s such that no two adjacent characters have the same type, meaning no two letters are adjacent and no two digits are adjacent.
Return the reformatted string. If it is impossible to reorder the characters to satisfy this condition, return an empty string "".
Constraints:
s.length
s consists of only lowercase English letters and digits.
You are given an alphanumeric string s consisting of lowercase English letters and digits.
Rearrange the characters of s such that no two adjacent characters have the same type, meaning no two letters are adjacent and no two digits are adjacent.
Return the reformatted string. If it is impossible to reorder the characters to satisfy this condition, return an empty string "".
Constraints:
s.length
s consists of only lowercase English letters and digits.