{"id":"sort-select-restore-idiom","text":"Subsequence selection problems use a two-sort pattern: sort by value to select the top-k elements, then re-sort by original index to restore input order — correctness does not depend on sort stability.","truth_value":"IN","source":"entries/2026/06/06/find-subsequence-of-length-k-with-the-largest-sum-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"sort-select-restore-idiom","truth_value":"IN","reason":"premise"}]}}