Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Nearest Value solution in Clear category for Nearest Value by JimmyCarlos
def nearest_value(values,target) -> int:
return min(values,key=lambda x:(abs(x-target),x))
April 10, 2019