LC 57
Insert Interval
Medium · LC 1–100
Candidate solution routes
Primary
FreeInterval sorting greedy
Invariant: Among solutions with the same number of selections from the processed prefix, the greedy one has a finish boundary no later than any replacement and therefore leaves maximal future room.
candidate confidence: 0.605 · metadata_only
How to use this page
Read the statement and constraints first, then validate recognition signals, invariant, and complexity. Candidate score is not correctness evidence.