sorted-adjacent-min-diff

Status: IN

After sorting distinct integers, the minimum absolute difference always occurs between adjacent elements; the minimum-absolute-difference solution relies on this to reduce from O(n^2) pair comparisons to O(n) adjacent scan.

Source: entries/2026/06/06/minimum-absolute-difference-solution.md

JSON