Search
⌘K

Leetcode 2780. Minimum Index of a Valid Split

Given an array that has a guaranteed global dominant element, find the smallest split index i (0 <= i < n-1) such that the same element is dominant in both the left prefix and right suffix. In other words, identify the global dominant and return the minimum i where its count in the left > (left length)/2 and its count in the right > (right length)/2.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.