summaryrefslogtreecommitdiff
path: root/Year_2
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2023-01-24 11:01:25 +0100
committerGitHub <noreply@github.com>2023-01-24 11:01:25 +0100
commitd431d1602852b4f94d84e5f303bdfb39b1dc5a75 (patch)
tree6661a857bee96e678ac4ef88954588466878f310 /Year_2
parent310f312a04cf292a4b29d45b1bdb13077d9a1cf7 (diff)
Diffstat (limited to 'Year_2')
-rw-r--r--Year_2/Algorithms/resto.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/Year_2/Algorithms/resto.cc b/Year_2/Algorithms/resto.cc
index 53fd6f6..87ab43d 100644
--- a/Year_2/Algorithms/resto.cc
+++ b/Year_2/Algorithms/resto.cc
@@ -12,7 +12,7 @@ change(vector<int>& coins, int sum)
int n = coins.size();
int* table = new int[sum+1];
- memset(table, sum, 0);
+ memset(table, 0, sum);
table[0] = 0;
for (int i = 1; i < sum+1; ++i) {