JavaScript, React, Python, Angular, HTML.
@param {number[]} nums * @return {number} */ var rob = (nums, i = 0) => { const isBaseCase = nums <= i; if (isBaseCase) return 0; const [ next, nextNext ] = [ (i + 1), (i + 2) ]; const right = nums[i]; const mid = rob(nums, next); /* Time O(2^N) | Space O(N) */ const left = rob(nums, nextNext);/*