Python
15. 3Sum - 1주차 알고리즘 리트코드 코딩 인터뷰 공부
15. 3Sum 정수 array nums 에서 세 정수의 합이 0 이되는 각기 다른 element 의 조합을 구하시오. (중복하는 조합은 제외) Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. 예시 1: Input: nums = [-1,0,1,2,-1,-4] Output: [[-1,-1,2],[-1,0,1]] nums[0] + nums[1] + nums[2] ..
2022. 9. 2. 16:01