House Robber · Compound Engineer

House Robber

Rob the most money from a row of houses without hitting two neighbours. Build the best total house by house, where each house either adds its loot to the best from two houses back, or is skipped.

DSAFreeMediumStep-through playerBy Aayush OstwalSolve on LeetCode ↗
Spotted a mistake in this lesson?Report an issue →