Given an integer array nums of length n and an integer target, find three integers whose sum is closest to target. Return the sum of the three integers.
Input: Integer array nums and integer target.
Output: Integer — sum of three numbers closest to target.
Input: [-1,2,1,-4],1
Output: 2
Explanation: Sum of [-1,2,1]=2. Closest to 1.Input: [0,0,0],1
Output: 0
Explanation: Only triplet is [0,0,0]=0.Input: [1,2,3],0
Output: 6
Explanation: Only triplet is [1,2,3]=6.3<=nums.length<=500-1000<=nums[i]<=1000-10^4<=target<=10^4