Problem Statement There are houses in a row, and each house contains amount of cash. A robber wants to steal from these houses, but he cannot rob two consecutive houses.
You have to help him and determine the maximum amount of money the robber can get. Constraints: Check the examples on the problem page. For , try figuring out which houses give you the maximum total without picking two in a row.