2020 第 15 周 LeetCode 记录

Yiran at 
1403. Minimum Subsequence in Non-Increasing Order 对数组进行排序,然后依次取出当前最大值,比较当前取出数值和与剩余数值和,如果大于,则返回取出数字。1234567891011121314class Solution: def minSubsequence(self, nums: List[int]) -> List[int]: N = len(nums) total = sum(nums) nums.sort() ret = [] t = 0 while ……