leetle

Daily challenge for 2025-02-10

41. 3Sum Closest

Write a function solve that finds the sum of three integers in an array that is closest to a target number. Return the sum of the three integers. You may assume that each input would have exactly one solution.

Example:
Input: [-1,2,1,-4], 1
Output: 2

Run this challenge interactively in Python or JavaScript when the app loads.