An element arr of length arr.
You are given a nums of length
A split at index i divides nums into two contiguous subarrays: nums[0 \dots i] and nums[i + 1 \dots n - 1], where i nums[0 \dots i] and nums[i + 1 \dots n - 1] have the same dominant element as nums.
Return the minimum index i of a valid split. If no valid split exists, return
Constraints:
nums.length
nums[i]
nums has exactly
An element arr of length arr.
You are given a nums of length
A split at index i divides nums into two contiguous subarrays: nums[0 \dots i] and nums[i + 1 \dots n - 1], where i nums[0 \dots i] and nums[i + 1 \dots n - 1] have the same dominant element as nums.
Return the minimum index i of a valid split. If no valid split exists, return
Constraints:
nums.length
nums[i]
nums has exactly