Sponsored
Use these hints if you're stuck. Try solving on your own first.
Keep an array power where power[i] is the maximum power of the i-th character.
The answer is max(power[i]).
Solve with full IDE support and test cases