You are given two nums and colors, both of length n.
The value nums[i] represents the amount of money at the colors[i] represents the color of the
You want to rob houses to maximize the total amount of money robbed. You cannot rob two adjacent houses if they have the same color.
Return the maximum amount of money you can rob.
Constraints:
n nums.length colors.length
nums[i], colors[i]
You are given two nums and colors, both of length n.
The value nums[i] represents the amount of money at the colors[i] represents the color of the
You want to rob houses to maximize the total amount of money robbed. You cannot rob two adjacent houses if they have the same color.
Return the maximum amount of money you can rob.
Constraints:
n nums.length colors.length
nums[i], colors[i]