A robber walks a street of houses with cash amounts nums, but robbing two adjacent houses trips the alarm. Return the maximum loot.
Input: one line of space-separated non-negative integers. Output: the maximum amount.
1 2 3 1
4
Rob houses 0 and 2.
2 7 9 3 1
12
Rob 2 + 9 + 1.
Run your code against the sample tests, or Submit to run the full suite.