Decode Ways

#91
Medium
Dynamic Programming
O(n)
O(1)
Amazon
Microsoft
Facebook
Uber
View on LeetCode

Problem Description

A message containing letters from A-Z can be encoded into numbers using the mapping A=1, B=2, ..., Z=26. Given a string s containing only digits, return the number of ways to decode it.