One minute
Leetcode-1899
In this solution, we are looking at all the triplets with values smaller than or equal to those in the target array and merging them into one triplet, temp
.
This way, we will make the greatest triplet that is smaller than equal to the target triplet, which will be the closest we can make to target.
Read other posts