sort-then-two-pointer-dominant-pair-pipeline

Status: IN

The sort-then-two-pointer pipeline is the dominant combined technique for pair and ordering problems, where O(n log n) sorting establishes the monotonicity invariant that two-pointer convergence exploits for O(n) scanning.

Justifications

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

Depends on (SL): sort-preprocessing-enables-linear-scan, two-pointer-primary-linear-array-technique

Depended on by

JSON