
[LeetCode] 15. 3Sum
·
🚩 코딩테스트/알고리즘
문제 https://leetcode.com/problems/3sum/ 3Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 코드 class Solution(object): def threeSum(self, nums): result = [] n = len(nums) nums.sort() for i in range(n-2): if i != 0 and nums[i-1] == nums[i]: continue j = i + 1 k = n - 1 while j < k..