Practice Minimum Difference in Sums After Removal of Elements
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Minimum Difference in Sums After Removal of Elements
Problem Statement
nums has 3n entries. Remove exactly n entries while preserving the relative order of those kept. Split the remaining 2n entries into their first n and final n, and return the smallest possible first-part sum minus second-part sum. This is a signed difference, not an absolute difference.
Source: Minimum Difference in Sums After Removal of Elements on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
nums = [3,1,2]
-1
# Example 2
nums = [7,9,5,8,1,3]
1
Constraints
Related LeetCode Problems
Practice more problems similar to Minimum Difference in Sums After Removal of Elements.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.