diff --git a/DynamicProgramming/RodCutting.java b/DynamicProgramming/RodCutting.java index 8a3242a0..f3afb4a5 100644 --- a/DynamicProgramming/RodCutting.java +++ b/DynamicProgramming/RodCutting.java @@ -23,8 +23,7 @@ public class RodCutting { // main function to test public static void main(String args[]) { int[] arr = new int[] {2, 5, 13, 19, 20}; - int size = arr.length; - int result = cutRod(arr, size); + int result = cutRod(arr, arr.length); System.out.println("Maximum Obtainable Value is " + result); } }