Update dynamic_programming/house_robber.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Swastika Gupta 2021-07-08 09:19:42 +05:30 committed by GitHub
parent 14dd84ec23
commit c76ef7cfef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ namespace house_robber {
* @param n size of array * @param n size of array
* @returns maximum amount of money that can be robbed * @returns maximum amount of money that can be robbed
*/ */
std::uint64_t houseRobber(const std::vector<int> &money, int n) { std::uint64_t houseRobber(const std::vector<int> &money, const int &n) {
if (n == 0) { // if there is no house if (n == 0) { // if there is no house
return 0; return 0;
} }