JavaScript, React, Python, Angular, HTML.
Math.max(mid, house); /* Space O(N) */ } return tabu[nums.length] }; const initTabu = (nums) => { const tabu = Array(nums.length + 1).fill(0); tabu[1] = nums[0]; return tabu; } /** * DP - Bottom Up * Time O(N) | Space O(1) * https://leetcode.com/problems/house-robber/ * @param {number[]} nums *