Sort the String

Published by Werdna in

Create a function that takes a string consisting of lowercase letters, uppercase letters and numbers and returns the string sorted in the same way as the examples below.

Examples

sorting("eA2a1E") ➞ "aAeE12"

sorting("Re4r") ➞ "erR4"

sorting("6jnM31Q") ➞ "jMnQ136"

sorting("846ZIbo") ➞ "bIoZ468"

Notes

N/A

Watch a quick demo on how Edabit works.