Problem 2975 · Medium

Maximum Square Area by Removing Fences From a Field

Find the largest side length that appears both as a horizontal gap and as a vertical gap between kept fences.

Open the interactive visualisation