{"id":"merge-scan-pattern-for-sorted-pair-processing","text":"The two-pointer merge-scan pattern (maintain a pointer into each sorted sequence, advance the pointer on the smaller value, act on equality or exhaustion) is a recurring O(n+m) technique for processing paired elements from two sorted inputs — instantiated in merge-alternately (interleave by index), merge-nums (sum by matching ID), and min-common-number (return on first match).","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["merge-alternately-linear-complexity","merge-nums-two-pointer-linear-time","two-pointer-merge-scan-for-sorted-intersection"],"outlist":[],"label":"Depth-1 cross-problem grouping: three solutions independently instantiate the same merge-scan template with different actions at the match/advance points"}],"dependents":["merge-scan-extends-sort-pipeline-to-dual-inputs"],"metadata":{"source_type":"derived","last_reviewed":"2026-06-07T22:02:22","review_result":"invalid"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"merge-scan-pattern-for-sorted-pair-processing","truth_value":"IN","reason":"SL justification valid","antecedents":["merge-alternately-linear-complexity","merge-nums-two-pointer-linear-time","two-pointer-merge-scan-for-sorted-intersection"],"label":"Depth-1 cross-problem grouping: three solutions independently instantiate the same merge-scan template with different actions at the match/advance points"},{"node":"merge-alternately-linear-complexity","truth_value":"IN","reason":"premise"},{"node":"merge-nums-two-pointer-linear-time","truth_value":"IN","reason":"premise"},{"node":"two-pointer-merge-scan-for-sorted-intersection","truth_value":"IN","reason":"premise"}]}}