the code below has two parameters "int price[ ] "and "n", how to change the code to have only one parameter "int price[ ]" and make it works?
// // A Naive recursive solution for Rod cutting problem
class RodCutting
{
/* Returns the best obtainable price for a rod of length
n and price[] as prices of different pieces */
static int cutRod(int price[], int n)
{
if (n <= 0)
return 0;
int max_val = Integer.MIN_VALUE;
// Recursively cut the rod in different pieces and
// compare different configurations
for (int i = 0; ireference: http://www.geeksforgeeks.org/dynamic-programming-set-13-cutting-a-rod/
