Problem 2780 · Medium

Minimum Index of a Valid Split

Count the dominant value on the left as the split moves right; a split is valid when both sides keep a majority of it.

Open the interactive visualisation