Search
⌘K

Leetcode 91. Decode Ways

Given a digit string, count how many ways it can be segmented into valid codes 1–26 (two-digit codes cannot start with '0'), handling invalid zeros and impossible encodings — a classic dynamic-programming/counting-over-partitions problem.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late August, 2024

Meta

Senior

Given an encoded string where letters are mapped to numbers (A->0, B->1, ..., Z->25), find the total number of possible decoding strings that can be generated.

Comments

Your account is free and you can post anonymously if you choose.