Problem 1968 · Medium

Array With Elements Not Equal to Average of Neighbors

Arrange distinct integers so that no interior element equals the average of its two neighbors. The visual places values in order and checks each neighbor triple.

Open the interactive visualisation