LC 72

Edit Distance

Medium · LC 1–100

dynamic-programmingstring
Free

Candidate solution routes

Primary

Subsequence dynamic programming

Free

Invariant: Every computed state exactly matches its endpoint/prefix definition and includes all legal final match, skip, or edit actions.

candidate confidence: 0.740 · 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.