Back to problems

House Robber II

Algorithm · Medium

You are a professional thief planning to rob houses along a circular street. The houses are arranged in a circle, meaning the first dwelling and the last dwelling are directly adjacent to each other. An array nums represents the money stashed in each house, all amounts non‑negative. A security system connects neighbouring houses, so you cannot rob two houses that sit next to each other in the circle. Determine the maximum total money you can steal without triggering the…

Checking your access…