Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Rob(int[] houses, int i)
- {
- if (i >= houses.Length) return 0;
- return Math.Max(
- houses[i] + Rob(houses, i + 2),
- Rob(houses, i + 1));
- }
- https://youtu.be/73r3KWiEvyk?list=PLot-Xpze53lcvx_tjrr_m2lgD2NsRHlNO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement