Skip to content

Commit da3d736

Browse files
committed
Update house-robber-ii.cpp
1 parent 7c8c37e commit da3d736

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/house-robber-ii.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ class Solution {
1010
if (nums.size() == 1) {
1111
return nums[0];
1212
}
13-
13+
1414
return max(robRange(nums, 0, nums.size() - 1), // Include the first one of nums without the last one.
1515
robRange(nums, 1, nums.size())); // Include the last one of nums without the first one.
1616
}
17-
17+
1818
int robRange(vector<int>& nums, int start, int end) {
1919
int num_i = nums[start], num_i_1 = 0, num_i_2 = 0;
2020
for (int i = start + 1; i < end; ++i) {

0 commit comments

Comments
 (0)