Solution to LeetCode 3Sum Closest problem.
The idea is the same as in the 3SUM question. Sort the array, and in \(O(n^2)\) time find the closest value.
Solution to LeetCode 3Sum Closest problem.
The idea is the same as in the 3SUM question. Sort the array, and in \(O(n^2)\) time find the closest value.