diff --git a/LeetCode/0561_Array_Partition_I.py b/LeetCode/0561_Array_Partition_I.py new file mode 100644 index 0000000..1743f89 --- /dev/null +++ b/LeetCode/0561_Array_Partition_I.py @@ -0,0 +1,3 @@ +class Solution: + def arrayPairSum(self, nums: List[int]) -> int: + return sum(sorted(nums)[::2]) \ No newline at end of file