15. 三數之和_python

【題目】 【思路】 兩次for循環,查找第三個數thrid = -nums[i] - nums[j] ,判斷剩下的數組中是否存在第三個數。 【python】 class Solution(object): def threeSum(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """
相關文章
相關標籤/搜索