Medium
Maximize robbed money without taking adjacent houses.
Given the amount of money in each house, return the maximum amount you can rob without robbing two adjacent houses.
Examples
Input: nums = [1,2,3,1]
Output: 4
Constraints
- 1 <= nums.length
Coding Challenge
Maximize robbed money without taking adjacent houses.
Given the amount of money in each house, return the maximum amount you can rob without robbing two adjacent houses.
Input: nums = [1,2,3,1]
Output: 4
Preparing your coding workspace...