Update dynamic_programming/cut_rod.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Pardeep Bhatt 2020-09-26 00:33:24 +05:30 committed by GitHub
parent 14a4f46ce7
commit 058b2ab438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ int maxProfitByCuttingRod(const std::array<int, T> &price, const int n) {
* @brief Function to test above algorithm
* @returns void
*/
void test() {
static void test() {
// Test 1
const int n1 = 8; // size of rod
std::array<int, n1> price1 = {1, 5, 8, 9, 10, 17, 17, 20}; // price array