Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Use set solution in Clear category for Missing Number by U.V
def missing_number(items: list[int]) -> int:
a,b=min(items),max(items)
d=(b-a)//len(items)
ans = set(range(a,b+d,d))-set(items)
return list(ans)[0]
Sept. 23, 2022
Comments: