Skip to content

Commit 9a7d29c

Browse files
missing Math.Max on line 4
1 parent f0b3d19 commit 9a7d29c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

csharp/0213-house-robber-ii.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
public class Solution {
22
public int Rob(int[] nums) {
33

4-
return Math.Max(nums[0], Mat
4+
return Math.Max(nums[0],Math.Max(
55
getMaxRobAmount(nums, 0, nums.Length - 1),
6-
getMaxRobAmount(nums, 1, nums.Length)
6+
getMaxRobAmount(nums, 1, nums.Length))
77
);
88
}
99

@@ -18,4 +18,4 @@ public int getMaxRobAmount(int[] nums, int start, int end) {
1818

1919
return rob2;
2020
}
21-
}
21+
}

0 commit comments

Comments
 (0)