Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
House Robber II
Bookmark
Input
Example 1
Example 2
Simple
Five houses
Single house
Custom
nums
=
[1, 2, 3, 1]
houses
1
2
3
1
dp
algo
master
.
io
Step:
Start: Houses in circle - first and last are adjacent
Variable
Value
nums
[1,2,3,1]
i
-
rob
-
not_rob
-
Variable
Value
case_1_max
-
case_2_max
-
return
-
0 / 9
Input
Example 1
Example 2
Simple
Five houses
Single house
Custom
nums
=
[1, 2, 3, 1]
0 / 9
houses
1
2
3
1
dp
algo
master
.
io
Step:
Start: Houses in circle - first and last are adjacent
Visualization
Variables