Given a sorted list and a target, return exactly k values with the smallest absolute difference.
Constraints
Example
>>> find_k_closest([1,2,3,4,5], 4, 3) [1,2,3,4] >>> find_k_closest([1,2,3,4,5], 4, -1) [1,2,3,4] >>> find_k_closest([1, 2, 3, 4, 5], 4, 6) [2,3,4,5]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints