🚀 LeetCode Daily Task: Minimum Index of a Valid Split (2780) #24
-
🚀 LeetCode Daily Task: Minimum Index of a Valid Split (2780)Difficulty: Medium #23 📝 Problem Statement Given a 0-indexed integer array You can split
A split is valid if:
Your task is to return the minimum index 💡 ExamplesExample 1: Input: nums = [1, 2, 2, 2]
Output: 2 Explanation:
Both subarrays share the same dominant element ( Example 2: Input: nums = [2, 1, 3, 1, 1, 1, 7, 1, 2, 1]
Output: 4 Explanation:
Both halves have the same dominant element ( Example 3: Input: nums = [3, 3, 3, 3, 7, 2, 2]
Output: -1 Explanation: 🛠 Constraints
🎯 How to Contribute
💬 Join the Discussion!
Let's learn, code, and grow together! 🚀 Useful Links: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ok that |
Beta Was this translation helpful? Give feedback.
ok that