Maximum Equal Frequency
Track value counts and count-of-counts for each prefix, then test whether removing one element can equalise every frequency.
Track value counts and count-of-counts for each prefix, then test whether removing one element can equalise every frequency.