NumPy allowed · plain Python earns 10 bonus points
Implement House Robber -- the classic 1-D DP problem with recurrence dp[i] = max(dp[i-1], dp[i-2] + nums[i]), reducible to O(1) space with two rolling variables.
Implement rob(nums): at each house, decide whether skipping it (carry forward the best sum so far) or robbing it (best sum from two houses back, plus this house) is larger. Roll two variables (prev2, prev1) forward instead of a full DP array.
rob(nums: list[int]) -> int