Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Speedy category for Escher Symmetry by juestr
from itertools import islice
def is_figure(data: list[int]) -> bool:
sums = (x + y for x, y in zip(data, reversed(data)))
h = next(sums, 0)
return all(s == h for s in islice(sums, len(data) // 2))
May 31, 2024
Comments: