Skip to content

Commit

Permalink
missing Math.Max on line 4
Browse files Browse the repository at this point in the history
  • Loading branch information
darshanpandya86 authored Jan 20, 2023
1 parent f0b3d19 commit 9a7d29c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions csharp/0213-house-robber-ii.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
public class Solution {
public int Rob(int[] nums) {

return Math.Max(nums[0], Mat
return Math.Max(nums[0],Math.Max(
getMaxRobAmount(nums, 0, nums.Length - 1),
getMaxRobAmount(nums, 1, nums.Length)
getMaxRobAmount(nums, 1, nums.Length))
);
}

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

return rob2;
}
}
}

0 comments on commit 9a7d29c

Please sign in to comment.