Pick three numbers whose sum is closest to target, and return that sum. Two approaches, same problem — switch between them and watch how time trades off.