House Robber
Dynamic programming · Take or skip with a small state · Easy · about 23 min
Why it matters
This is a dependable first pattern for linear dynamic programming.
How it connects
Climbing Stairs combined two previous counts. Now each house creates a take-or-skip choice.
Try first
At house i, compare the best plan that skips it with the best plan that takes it.
Interview cue
The state is the best money through each position, reduced to two rolling values.