LC 62

Unique Paths

Medium · LC 1–100

combinatoricsdynamic-programmingmath
Free

Candidate solution routes

Primary

Grid dynamic programming

Free

Invariant: When cell (r,c) is processed, every predecessor state already meets its definition; the new state aggregates every legal way to enter the cell exactly as required.

candidate confidence: 0.555 · metadata_only

Alternate 1

Combinatorial counting / inclusion-exclusion

Free

Invariant: Every valid outcome maps to one counting representation, or to a known fixed multiplicity that is explicitly corrected.

candidate confidence: 0.665 · metadata_only

Alternate 2

Linear dynamic programming

Free

Invariant: After processing i, every state through i equals the true value under its definition, and every future transition reads only these finalized states.

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