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