{"id":"two-sum-iv-check-before-insert","text":"`findTarget` prevents self-pairing by checking the `seen` set *before* inserting the current node's value — the ordering of check-then-add is the critical invariant.","truth_value":"IN","source":"entries/2026/06/06/two-sum-iv-input-is-a-bst-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":["two-sum-family-spans-lookup-strategy-space"],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"two-sum-iv-check-before-insert","truth_value":"IN","reason":"premise"}]}}