Skip to content

#198 - House Robber

MediumDP - 1D
Open on LeetCode

Given an array nums representing the amount of money in each house, you cannot rob two adjacent houses. Return the maximum amount you can rob.

InputOutput
nums = [1,2,3,1]4
nums = [2,7,9,3,1]12

Released under the MIT License.