91 Decode Ways
91. Decode Ways
1. Question
'A' -> 1
'B' -> 2
...
'Z' -> 26Input: "12"
Output: 2
Explanation:
It could be decoded as "AB" (1 2) or "L" (12).Input: "226"
Output: 3
Explanation:
It could be decoded as "BZ" (2 26), "VF" (22 6), or "BBF" (2 2 6).2. Implementation
3. Time & Space Complexity
Last updated