
[LeetCode] 2780. Minimum Index of a Valid Split (Python)
·
알고리즘/LeetCode
난이도: MediumProblem DescriptionAn element x of an integer array arr of length m is dominant if more than half the elements of arr have a value of x. You are given a 0-indexed integer array nums of length n with one dominant element. You can split nums at an index i into two arrays nums[0, ..., i] and nums[i + 1, ..., n - 1], but the split is only valid if:0 nums[0, ..., i], and nums[i + 1, ..., n..