Search
⌘K

Leetcode 213. House Robber II

Given a circular array of nonnegative values where robbing two adjacent houses is forbidden, find the maximum total amount you can rob without alerting the police. The circular layout (first and last are adjacent) is the key twist that prevents a single linear non-adjacent selection DP and is typically handled by considering the two scenarios that exclude either the first or the last house.

Asked at:

Microsoft

Microsoft

Amazon

Amazon


Question Timeline

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

Mid January, 2026

Amazon

Amazon

Mid-level

Early January, 2026

Microsoft

Microsoft

Senior

Mid December, 2025

Amazon

Amazon

Senior

Comments

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