Search
⌘K

Leetcode 198. House Robber

Given an array of nonnegative integers representing house values, find the maximum sum you can obtain by selecting houses with the constraint that no two chosen houses are adjacent — a classic dynamic programming problem of deciding at each index whether to rob it or skip it to maximize total.

Asked at:

Amazon

Amazon


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid December, 2025

Amazon

Amazon

Senior

Early February, 2025

Amazon

Amazon

Mid-level

Comments

Your account is free and you can post anonymously if you choose.