We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14dd84e commit c76ef7cCopy full SHA for c76ef7c
dynamic_programming/house_robber.cpp
@@ -30,7 +30,7 @@ namespace house_robber {
30
* @param n size of array
31
* @returns maximum amount of money that can be robbed
32
*/
33
-std::uint64_t houseRobber(const std::vector<int> &money, int n) {
+std::uint64_t houseRobber(const std::vector<int> &money, const int &n) {
34
if (n == 0) { // if there is no house
35
return 0;
36
}
0 commit comments