Skip to content

Latest commit

 

History

History

challenge-12

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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"