24. House Robber
Return the maximum amount that can be robbed without choosing two adjacent houses.
Example 1:
Input: nums = [1,2,3,1] Output: 4
Example 2:
Input: nums = [2,7,9,3,1] Output: 12
Constraints:
0 <= nums.length <= 100
Return the maximum amount that can be robbed without choosing two adjacent houses.
Input: nums = [1,2,3,1] Output: 4
Input: nums = [2,7,9,3,1] Output: 12
0 <= nums.length <= 100