mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update dynamic_programming/cut_rod.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
parent
14a4f46ce7
commit
058b2ab438
@ -68,7 +68,7 @@ int maxProfitByCuttingRod(const std::array<int, T> &price, const int n) {
|
|||||||
* @brief Function to test above algorithm
|
* @brief Function to test above algorithm
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
void test() {
|
static void test() {
|
||||||
// Test 1
|
// Test 1
|
||||||
const int n1 = 8; // size of rod
|
const int n1 = 8; // size of rod
|
||||||
std::array<int, n1> price1 = {1, 5, 8, 9, 10, 17, 17, 20}; // price array
|
std::array<int, n1> price1 = {1, 5, 8, 9, 10, 17, 17, 20}; // price array
|
||||||
|
Loading…
Reference in New Issue
Block a user