Finding the value closest to 0

Medium

Suppose you are given a list of Q 1D points. Write code to return the value in Q that is the closest to value j. If two values are equally close to j, return the smaller value. ...

Sign in to InterviewQs to view this question

Or

New to InterviewQs? Sign up now.

By proceeding, you agree to our Terms and Conditions and Privacy Policy.

Loading editor...