2020年8月11日

三数之和(15)

摘要: class Solution(object): def threeSum(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ nums.sort() if not nums or len(nums)<3: return 阅读全文

posted @ 2020-08-11 17:32 不要挡着我晒太阳 阅读(70) 评论(0) 推荐(0) 编辑

两数之和(1)

摘要: 法一: class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: ret = [] for i in range(len(nums)): for j in range(1,len(nums)-i): if 阅读全文

posted @ 2020-08-11 14:22 不要挡着我晒太阳 阅读(65) 评论(0) 推荐(0) 编辑

导航