LeetCode 915: Partition Array into Disjoint Intervals
Problem Restatement We are given an integer array nums . We need to split it into two contiguous non-empty parts: left = nums[0:i] right = nums[i:] The split must satisfy: max(left) <= min(right) In words, every element in left must be less than or equal to every element in right . Return the smallest possible length of left . The problem guarantees that a valid partition exists. Input and Output...