Given a string s, reorder its characters using the following algorithm:
s and append it to the result.s that is strictly greater than the last appended character, and append it to the result.s and append it to the result.s that is strictly smaller than the last appended character, and append it to the result.s have been used.
Return the resulting string.
Constraints:
s.length
s consists of only lowercase English letters.
Given a string s, reorder its characters using the following algorithm:
s and append it to the result.s that is strictly greater than the last appended character, and append it to the result.s and append it to the result.s that is strictly smaller than the last appended character, and append it to the result.s have been used.
Return the resulting string.
Constraints:
s.length
s consists of only lowercase English letters.