Skip to content

Commit da7b8f1

Browse files
authored
Update make-array-non-decreasing-or-non-increasing.cpp
1 parent e44f21f commit da7b8f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

C++/make-array-non-decreasing-or-non-increasing.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Solution {
1717
}
1818
return result;
1919
};
20+
2021
return min(f(cbegin(nums), cend(nums)), f(crbegin(nums), crend(nums)));
2122
}
2223
};
@@ -42,6 +43,7 @@ class Solution2 {
4243
}
4344
return dp[vals.back()];
4445
};
46+
4547
return min(f(cbegin(nums), cend(nums)), f(crbegin(nums), crend(nums)));
4648
}
4749
};

0 commit comments

Comments
 (0)