24. House Robber
Return the maximum amount that can be robbed without choosing two adjacent houses.
範例 1:
輸入: nums = [1,2,3,1] 輸出: 4
範例 2:
輸入: nums = [2,7,9,3,1] 輸出: 12
限制條件:
0 <= nums.length <= 100
Return the maximum amount that can be robbed without choosing two adjacent houses.
輸入: nums = [1,2,3,1] 輸出: 4
輸入: nums = [2,7,9,3,1] 輸出: 12
0 <= nums.length <= 100