Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
exhaustive search solution in Clear category for Evenly Spaced Trees by MrPod
def evenly_spaced_trees(t):
a=max(b-a for a,b in zip(t,t[1:]))
for i in range(a,0,-1):
l={j for j in range(t[0],t[~0]+1,i)}
if set(t)<=l:
return len(l)-len(t)
April 1, 2020