Skip to content

Commit 20e100a

Browse files
fix code for Solution 198 (golang)
1 parent 4476ec2 commit 20e100a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solution/0198.House Robber/Solution.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
func rob(nums []int) int {
77
x, y := 0, 0
88
for _, n := range nums {
9-
x, y = y, x+y
9+
x, y = y, x+n
1010
if x > y {
1111
y = x
1212
}

0 commit comments

Comments
 (0)