Sponsored
Use these hints if you're stuck. Try solving on your own first.
Think greedily.
If you build the string from the end to the beginning, it will always be optimal to put the highest possible character at the current index.
Solve with full IDE support and test cases