```
def rob(self, nums):
tmp = nums
if len(tmp) >= 1:
max0 = tmp[0]
if len(tmp) >= 3:
max0 += self.rob(tmp[2:])
else:
max0 = 0
if len(tmp) >= 2:
max1 = tmp[1]
if len(tmp) >= 4:
max1 += self.rob(tmp[3:])
else:
max1 = 0
return max(max0, max1)
```

My solution seems to check all combinations of the houses, but I haven't done much dynamic programming so I can't adopt that yet. Any suggestion on what to improve on this?