Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Nearest Value by mscislaw
def nearest_value(values: set, one: int) -> int:
return min(values, key=lambda value: (abs(one - value), value))
May 2, 2021