diff --git a/dynamic_programming/house_robber.cpp b/dynamic_programming/house_robber.cpp index 4e6dc90fc..b718cfa85 100644 --- a/dynamic_programming/house_robber.cpp +++ b/dynamic_programming/house_robber.cpp @@ -30,7 +30,7 @@ namespace house_robber { * @param n size of array * @returns maximum amount of money that can be robbed */ -std::uint64_t houseRobber(const std::vector &money, int n) { +std::uint64_t houseRobber(const std::vector &money, const int &n) { if (n == 0) { // if there is no house return 0; }