Let 1 represent ‘A’, 2 represents ‘B’, etc.
Given a digit sequence, count the number of possible decodings of the given digit sequence.
Input: "121"
Output: 3 // "ABA", "AU" and "LA"
Input: "1234"
Output: 3 // "ABCD", "LCD" and "AWD"
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Let 1 represent ‘A’, 2 represents ‘B’, etc.
Given a digit sequence, count the number of possible decodings of the given digit sequence.
Input: "121"
Output: 3 // "ABA", "AU" and "LA"
Input: "1234"
Output: 3 // "ABCD", "LCD" and "AWD"