Skip to content

Commit 51f3606

Browse files
Result print
1 parent f6ca5e3 commit 51f3606

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DynamicProgramming/RodCutting.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ private static int cutRod(int[] price, int n) {
2626
public static void main(String args[]) {
2727
int[] arr = new int[]{2, 5, 13, 19, 20};
2828
int size = arr.length;
29+
int result = cutRod(arr,size);
2930
System.out.println("Maximum Obtainable Value is " +
30-
cutRod(arr, size));
31+
result);
3132
}
3233
}

0 commit comments

Comments
 (0)