Skip to content

Commit

Permalink
Update minimum-cost-to-split-an-array.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 authored Jan 24, 2023
1 parent 68f71e6 commit f58ce15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion C++/minimum-cost-to-split-an-array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Solution {
vector<int> dp(size(nums) + 1, numeric_limits<int>::max());
dp[0] = 0;
for (int i = 0; i + 1 < size(dp); ++i) {
unordered_map<int, int> cnt;
vector<int> cnt(size(nums));
int d = 0;
for (int j = i + 1; j < size(dp); ++j) {
if (++cnt[nums[j - 1]] == 1) {
Expand Down

0 comments on commit f58ce15

Please sign in to comment.