Practice Minimize Maximum Pair Sum in Array
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
Partition all entries of even-length nums into pairs, using every occurrence exactly once. The cost of a pairing is its largest pair sum. Return the smallest possible cost over all pairings.
Source: Minimize Maximum Pair Sum in Array on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [3,5,2,3]
Output
7
# Example 2
Input
nums = [3,5,4,2,4,6]
Output
8
Constraints
n == nums.length
2 <= n <= 10^5
n is even.
1 <= nums[i] <= 10^5
Related LeetCode Problems
Practice more problems similar to Minimize Maximum Pair Sum in Array.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.