Var size is redunant (#2139)
This commit is contained in:
parent
183784b989
commit
aa8858b57a
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user