Skip to content

Latest commit

 

History

History

decode-ways

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Jump 1 or 2 steps, Climbing Stairs

"12", it could be decoded as "AB" (1 2) or "L" (12).

It is just like jumping 1 step A B or 2 steps 12.

But, there are some restrictions.

e.g.

"31" can only decode as "C" (3) and "A" (1)

So, what we need to do is to add something to the Climbing Stairs, do not climb the invalid stairs.