LC 44

Wildcard Matching

Hard · LC 1–100

dynamic-programminggreedyrecursionstring
Free

Candidate solution routes

Primary

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.738 · metadata_only

Alternate 1

Exchange-argument greedy ordering

Free

Invariant: The greedy prefix has no local inversion, and at least one global optimum agrees with that entire prefix.

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