Problems > Non-Adjacent Loot > Editorial

Non-Adjacent Loot — Solution & Editorial

Back to the Problem

Classic pair-state DP: best including the current house vs best excluding it.

Complexity: O(N)