Programming Question: Leetcode-16
Approach to solve leetcode question- 16 3Sum Closest
- This question is somewhat similar to previous question leetcode -15 3Sum with a small change.
2. In this solution , we will take each element of array nums , and then for each element we will take two elements ahead of that element. Find the total of all three and compare which one is closer to the target.
3.return the closest distance from target.
Code :
