Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Count the frequency of each character.
Loop over all character from 'a' to 'z' and append the character if it exists and decrease frequency by 1. Do the same from 'z' to 'a'.
Keep repeating until the frequency of all characters is zero.