JavaScript, React, Python, Angular, HTML.
Memoization, function rob(nums) { const memo = new Array(nums.length).fill(-1); return robHelper(nums, 0, memo); } function robHelper(nums, index, memo) { if (index >= nums.length) { return 0; } if (memo[index] !== -1) { return memo[index]; } // Rob the current house and move to the house two steps