JavaScript, React, Python, Angular, HTML.
Time O(N) | Space O(N) */ const house = left + right; memo[i] = Math.max(mid, house); /* | Space O(N) */ return memo[i]; }; const initMemo = (nums) => Array(nums.length + 1).fill(-1); /** * DP - Bottom Up * Array - Tabulation * Time O(N) | Space O(N) * https://leetcode.com/problems/house-robber/ *