← Back to all problems
Medium

House Robber II

Updated Feb 24, 2026

Problem

Houses are in a circle. Return max amount you can rob.

Constraints

1 <= nums.length <= 100

Examples

Example 1

Input: {"nums": [2, 3, 2]}
Output: 3

Function Signature

def rob(self, nums: list[int]) -> int

How to Submit

Implement a Solution class with a rob method.

Your method will be called with the input parameters and should return the answer.