summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {