island-perimeter-subtract-two

Status: IN

Each shared edge between two land cells removes exactly 2 from the perimeter total; checking only up and left neighbors (not all four) guarantees each adjacency is counted exactly once because the scan is top-to-bottom, left-to-right.

Source: entries/2026/06/06/island-perimeter-solution.md

JSON