Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use 2-pointers algorithm to make sure all amount of characters outside the 2 pointers are smaller or equal to n/4.
That means you need to count the amount of each letter and make sure the amount is enough.