NeetCode #110LC-2780MediumArrays & Hashing
← Back to All Problems#110 · #2780 · Minimum Index of a Valid Split(合法分割的最小下标)
📌 Problem Statement & Constraints
An element is dominant if it appears more than half the time in an array. Given
nums with a dominant element, find the minimum index i such that the dominant element is still dominant in both nums[0..i] and nums[i+1..n-1]. Return -1 if no such split exists. Constraints: 1 <= nums.length <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!