Sponsored
Use these hints if you're stuck. Try solving on your own first.
Start constructing the string in descending order of characters.
When repeatLimit is reached, pick the next largest character.
Solve with full IDE support and test cases