Hi, here’s your problem today. This problem was recently asked by Google:
Given a list of numbers and a target number n, find 3 numbers in the list that sums closest to the target number n. There may be multiple ways of creating the sum closest to the target number, you can return any combination in any order.
Here’s an example and some starter code.
def closest_3sum(nums, target):
Fill this in.
print(closest_3sum([2, 1, -5, 4], -1))