15. 三数之和_python

【题目】 【思路】 两次for循环,查找第三个数thrid = -nums[i] - nums[j] ,判断剩下的数组中是否存在第三个数。 【python】 class Solution(object): def threeSum(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """
相关文章
相关标签/搜索