16. 3Sum Closest
·
Algorithm
3Sum Closest - 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 정수가 담긴 배열 nums, 특정한 정수 target이 주어진다. nums의 정수 3개를 골라서 더한 합이 target과 가장 가깝게 되는 정수 3개의 합을 반환하는 문제다. 예시 Input: nums = [-1,2,1,-4], target = 1 Output: 2 Explanation: The sum that is closest to the target is 2. (-1 + 2 + 1 =..