{"id":"early-return-on-first-match","text":"`containsNearbyDuplicate` returns `True` on the first duplicate found within distance `k`, short-circuiting the rest of the scan.","truth_value":"IN","source":"entries/2026/06/06/contains-duplicate-ii-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"early-return-on-first-match","truth_value":"IN","reason":"premise"}]}}