{"id":"cursor-streaming-unifies-input-multiplicity","text":"Cursor-based streaming — monotonic pointer progression with state accumulation — is a unified framework that handles arbitrary input multiplicity: two-pointer handles single-input problems (convergence, compaction, inward sweep) while merge-scan handles dual-input problems (sorted intersection, alternating merge), varying only cursor count and advancement rules while preserving the core streaming invariants of monotonic progress and O(n) termination.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["two-pointer-is-dual-cursor-streaming","merge-scan-extends-sort-pipeline-to-dual-inputs"],"outlist":[],"label":"Two-pointer and merge-scan are cursor-count variants of one streaming framework, not separate techniques"}],"dependents":["streaming-extends-through-three-orthogonal-axes"],"metadata":{"source_type":"derived","last_reviewed":"2026-06-07T22:02:22","review_result":"pass"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"cursor-streaming-unifies-input-multiplicity","truth_value":"IN","reason":"SL justification valid","antecedents":["two-pointer-is-dual-cursor-streaming","merge-scan-extends-sort-pipeline-to-dual-inputs"],"label":"Two-pointer and merge-scan are cursor-count variants of one streaming framework, not separate techniques"},{"node":"two-pointer-is-dual-cursor-streaming","truth_value":"IN","reason":"SL justification valid","antecedents":["two-pointer-primary-linear-array-technique","single-pass-streaming-dominant-shape"],"label":"both patterns share monotonic-progress + O(1)-state invariants; two-pointer adds a second cursor axis"},{"node":"two-pointer-primary-linear-array-technique","truth_value":"IN","reason":"SL justification valid","antecedents":["two-pointer-convergence-linear-time","two-pointer-sorted-array-pattern","two-pointer-backward-fill-avoids-sort","sort-then-two-pointer-pattern"],"label":"Two-pointer subsumes multiple problem families into a single O(n) framework"},{"node":"two-pointer-convergence-linear-time","truth_value":"IN","reason":"premise"},{"node":"two-pointer-sorted-array-pattern","truth_value":"IN","reason":"premise"},{"node":"two-pointer-backward-fill-avoids-sort","truth_value":"IN","reason":"premise"},{"node":"sort-then-two-pointer-pattern","truth_value":"IN","reason":"premise"},{"node":"single-pass-streaming-dominant-shape","truth_value":"IN","reason":"SL justification valid","antecedents":["early-exit-optimizations-pervasive","o1-space-via-running-accumulators","extend-or-reset-canonical-consecutive-pattern"],"label":"these three patterns compose into a unified streaming shape — accumulators provide O(1) state, extend-or-reset handles consecutive-element logic, and early-exit bounds work to the minimum needed"},{"node":"early-exit-optimizations-pervasive","truth_value":"IN","reason":"SL justification valid","antecedents":["three-consecutive-odds-early-exit","path-crossing-early-exit","isomorphic-early-return","first-violation-sufficiency"],"label":"Early exit is the default control flow strategy, not an optimization afterthought"},{"node":"three-consecutive-odds-early-exit","truth_value":"IN","reason":"premise"},{"node":"path-crossing-early-exit","truth_value":"IN","reason":"premise"},{"node":"isomorphic-early-return","truth_value":"IN","reason":"premise"},{"node":"first-violation-sufficiency","truth_value":"IN","reason":"premise"},{"node":"o1-space-via-running-accumulators","truth_value":"IN","reason":"SL justification valid","antecedents":["highest-altitude-single-pass","longest-task-single-pass-o1-space","iterative-reversal-O1-space","min-tracking-pattern-shared"],"label":"Running accumulators trade re-traversal impossibility for constant memory across streaming-style problems"},{"node":"highest-altitude-single-pass","truth_value":"IN","reason":"premise"},{"node":"longest-task-single-pass-o1-space","truth_value":"IN","reason":"premise"},{"node":"iterative-reversal-O1-space","truth_value":"IN","reason":"premise"},{"node":"min-tracking-pattern-shared","truth_value":"IN","reason":"premise"},{"node":"extend-or-reset-canonical-consecutive-pattern","truth_value":"IN","reason":"SL justification valid","antecedents":["extend-or-reset-pattern","maxpower-eager-max-update","no-post-loop-fixup-needed"],"label":"Run-tracking with eager max avoids off-by-one errors that end-of-array special cases introduce"},{"node":"extend-or-reset-pattern","truth_value":"IN","reason":"premise"},{"node":"maxpower-eager-max-update","truth_value":"IN","reason":"premise"},{"node":"no-post-loop-fixup-needed","truth_value":"IN","reason":"premise"},{"node":"merge-scan-extends-sort-pipeline-to-dual-inputs","truth_value":"IN","reason":"SL justification valid","antecedents":["merge-scan-pattern-for-sorted-pair-processing","sort-then-two-pointer-dominant-pair-pipeline"],"label":"merge-scan preserves sort-then-scan's structure while generalizing to dual sorted inputs"},{"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"},{"node":"sort-then-two-pointer-dominant-pair-pipeline","truth_value":"IN","reason":"SL justification valid","antecedents":["sort-preprocessing-enables-linear-scan","two-pointer-primary-linear-array-technique"],"label":"sort provides the sorted precondition that two-pointer inward sweep and sorted-pair matching require; these two depth-1 patterns co-occur in two-sum-less-than-k, array-partition, and meeting-rooms families"},{"node":"sort-preprocessing-enables-linear-scan","truth_value":"IN","reason":"SL justification valid","antecedents":["sort-then-two-pointer-pattern","meeting-rooms-sort-then-scan","array-partition-sort-greedy","subsequence-limited-sum-greedy-sort"],"label":"Sorting is the universal complexity bridge from quadratic brute-force to n-log-n solutions"},{"node":"meeting-rooms-sort-then-scan","truth_value":"IN","reason":"premise"},{"node":"array-partition-sort-greedy","truth_value":"IN","reason":"premise"},{"node":"subsequence-limited-sum-greedy-sort","truth_value":"IN","reason":"premise"}]}}