numDecodings = (str, index = 0, memo = new Map()) => {
    const isBaseCase1 = !str.length || (str[index] === '0');
    if (isBaseCase1) return 0;

    const isisBaseCase2 = index === str.length;
    if (isisBaseCase2) return 1;

    if (memo.has(index)) return memo.get(index);

    return dfs(str, index, memo);
}
DP - Top Down
Hash Map - Memoization
Time O(N) | Space O(N)
https://leetcode.com/problems/decode-ways/
@param {string} s
@return {number}