bisect-two-neighbor-sufficiency

Status: IN

After `bisect_left` on sorted `arr2`, checking only `arr2[pos]` and `arr2[pos-1]` is sufficient to determine if any element is within distance `d` of `val` — all other elements are provably farther away.

Source: entries/2026/06/06/find-the-distance-value-between-two-arrays-solution.md

JSON