Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
native_evenly_spaced_trees solution in Uncategorized category for Evenly Spaced Trees by Jon_Red
def evenly_spaced_trees(trees:list([int]))->int:
l,s={i for i in range(min(trees),max(trees)+1,max(trees))},max(trees)-1
while set(trees)-l:l,s={i for i in range(min(trees),max(trees)+1,s)},s-1
return len(l)-len(trees)
June 16, 2020