Problem 3714 · Medium

Longest Balanced Substring II

The larger version of the balanced substring task: every distinct letter inside the substring must appear the same number of times.

Open the interactive visualisation