Sponsored
Use these hints if you're stuck. Try solving on your own first.
Store the frequency of each character for all prefixes.
Use Binary Search.
Solve with full IDE support and test cases