Question: code using c++ You are a professional thief tasked with collecting as much treasure as possible from a series of houses. Each house has a
You are a professional thief tasked with collecting as much treasure as possible from a series of houses. Each house has a certain amount of riches, but the only thing stopping you from collecting all of the treasure is the fact that neighboring houses have security systems connected, and they will automatically alert the authorities if two neighboring houses are robbed in the same night. Given an array of integers representing the amount of treasure in each house, return the maximum amount of riches you can collect without attracting the attention of the authorities. Constraints: 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
