Problem
A message containing letters from A-Z
is being encoded to numbers using the following mapping:
1 | 'A' -> 1 |
Given a non-empty string containing only digits, determine the total number of ways to decode it.
The answer is guaranteed to fit in a 32-bit integer.