Skip to content

Commit ba1aadb

Browse files
authored
Update house-robber.cpp
1 parent 11f64a2 commit ba1aadb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/house-robber.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Solution {
55
public:
66
int rob(vector<int>& nums) {
77
int last = 0, result = 0;
8-
for (const auto& num : nums) {
8+
for (const auto& i : nums) {
99
auto tmp = result;
1010
result = max(last + i, result);
1111
last = tmp;

0 commit comments

Comments
 (0)