mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update dynamic_programming/house_robber.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
parent
14dd84ec23
commit
c76ef7cfef
@ -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<int> &money, int n) {
|
||||
std::uint64_t houseRobber(const std::vector<int> &money, const int &n) {
|
||||
if (n == 0) { // if there is no house
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user