{"id":"seen-set-checks-before-insert","text":"The standard duplicate-detection idiom checks `if x in seen` before `seen.add(x)`, preventing an element from matching itself — used in sliding-window and two-sum family problems throughout the repo.","truth_value":"IN","source":"entries/2026/06/06/find-subarrays-with-equal-sum-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"seen-set-checks-before-insert","truth_value":"IN","reason":"premise"}]}}