Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Before the last operation, only the most frequent characters in the original string will remain.
Keep only the last occurence of each of the most frequent characters.