early-return-on-first-match

Status: IN

`containsNearbyDuplicate` returns `True` on the first duplicate found within distance `k`, short-circuiting the rest of the scan.

Source: entries/2026/06/06/contains-duplicate-ii-solution.md

JSON