Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 917 Bytes

_1877. Minimize Maximum Pair Sum in Array.md

File metadata and controls

37 lines (25 loc) · 917 Bytes

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : June 23, 2024

Last updated : June 23, 2024


Related Topics : Array, Two Pointers, Greedy, Sorting

Acceptance Rate : 81.44 %


Solutions

Python

class Solution:
    def minPairSum(self, nums: List[int]) -> int:
        nums.sort()
        maxx = 0

        for i in range(len(nums) // 2) :
            maxx = max(maxx, nums[i] + nums[len(nums) - i - 1])

        return maxx