Tagged in

Lists

數據共筆
數據共筆
Followers
5
Elsewhere
More, on Medium

LeetCode:(Array)(Python)Array Partition

題目連結:https://leetcode.com/problems/array-partition/description/

有一個 List,其中數字個數為偶數

將所有數字兩兩分組,從每組找出較大數字,加總較大數值後回傳

看一個範例就可以理解