Minimum Index of a Valid Split | Leetcode 2780