Search
⌘K

Leetcode 16. 3Sum Closest

Given an integer array and a target, find three numbers whose sum is closest to the target (unique solution guaranteed) and return that sum. This is a three-sum variant usually approached by sorting and a two-pointer sweep to check pair sums for each fixed element.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.