#91

Decode Ways

medium· 1-D DPruns: 0

A message containing letters from A-Z can be encoded into numbers using the mapping 'A' to 1, 'B' to 2, ..., 'Z' to 26. To decode an encoded message, the digits must be grouped and mapped back into letters. Given a string s of digits, return the number of ways to decode it. The test cases are generated so the answer fits in a 32-bit integer.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.