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.
Find the largest side length that appears both as a horizontal gap and as a vertical gap between kept fences.