in reply to find closest element of array without going over

If the array is sorted, you can perform a binary search
  • Comment on Re: find closest element of array without going over