{"id":"sorted-order-enables-all-efficient-search","text":"Sorted order is a key prerequisite for two major families of efficient search and scan algorithms: it enables O(n) linear-scan techniques (two-pointer, adjacent-pair, greedy) after an O(n log n) preprocessing step, and it enables O(log n) binary search via convergence-loop structures that narrow a search range. The choice between these approaches depends on whether the problem requires processing multiple elements or locating a specific target.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["sort-preprocessing-enables-linear-scan","binary-search-variants-share-convergence-structure"],"outlist":[],"label":"Sorting is the shared upstream step; linear scan and binary search are the two downstream consumers that exploit the monotonicity it establishes, covering the full spectrum from exhaustive to targeted search"}],"dependents":["lookup-abstractions-enable-linear-time-across-paradigms","two-preprocessing-paradigms-partition-problems"],"metadata":{"last_reviewed":"2026-06-07T22:02:22","review_result":"pass"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"sorted-order-enables-all-efficient-search","truth_value":"IN","reason":"SL justification valid","antecedents":["sort-preprocessing-enables-linear-scan","binary-search-variants-share-convergence-structure"],"label":"Sorting is the shared upstream step; linear scan and binary search are the two downstream consumers that exploit the monotonicity it establishes, covering the full spectrum from exhaustive to targeted search"},{"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":"sort-then-two-pointer-pattern","truth_value":"IN","reason":"premise"},{"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"},{"node":"binary-search-variants-share-convergence-structure","truth_value":"IN","reason":"SL justification valid","antecedents":["binary-search-on-derived-quantities-pattern","binary-search-on-value-pattern","left-biased-binary-search-pattern","fixed-point-uses-leftmost-binary-search"],"label":"the four patterns are orthogonal specializations of one template — search-target and bias are independent choices, and recognizing the shared structure reveals that any new binary search problem maps to a point in this 2D design space"},{"node":"binary-search-on-derived-quantities-pattern","truth_value":"IN","reason":"premise"},{"node":"binary-search-on-value-pattern","truth_value":"IN","reason":"premise"},{"node":"left-biased-binary-search-pattern","truth_value":"IN","reason":"premise"},{"node":"fixed-point-uses-leftmost-binary-search","truth_value":"IN","reason":"premise"}]}}