Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 213 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 213 Bytes

Finding the value closest to 0

You are given a list of Q 1D points, return the value in Q that is the closest to value j.

Example:

Q = [1, -1, -5, 2, 4, -2, 1]

j = 3

The answer in this case 2.