JavaScript, React, Python, Angular, HTML.
const isBaseCase = nums.length <= i; if (isBaseCase) return 0; const hasSeen = 0 <= memo[i]; if (hasSeen) return memo[i]; const [ next, nextNext ] = [ (i + 1), (i + 2) ]; const right = nums[i]; const mid = rob(nums, next, memo); /* Time O(N) | Space O(N) */ const left = rob(nums, nextNext, memo);/*