24. House Robber
Return the maximum amount that can be robbed without choosing two adjacent houses.
Contoh 1:
Input: nums = [1,2,3,1] Output: 4
Contoh 2:
Input: nums = [2,7,9,3,1] Output: 12
Batasan:
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