Practice Find the Value of the Partition
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Divide every nums occurrence into one of two nonempty arrays nums1 and nums2. Return the minimum possible abs(max(nums1) - min(nums2)). The groups need not be contiguous parts of the original order.
Source: Find the Value of the Partition on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [1,3,2,4]
Output
1
# Example 2
Input
nums = [100,1,10]
Output
9
Constraints
2 <= nums.length <= 10^5
1 <= nums[i] <= 10^9
Related LeetCode Problems
Practice more problems similar to Find the Value of the Partition.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.