Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 337 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 337 Bytes

Count possible decodings of a given digit sequence

Description

Let 1 represent ‘A’, 2 represents ‘B’, etc.

Given a digit sequence, count the number of possible decodings of the given digit sequence.

Examples

Input:  "121"
Output: 3 // "ABA", "AU" and "LA"

Input: "1234"
Output: 3 // "ABCD", "LCD" and "AWD"