Refactor Code Style (#4151)

This commit is contained in:
Saurabh Rahate
2023-04-15 13:55:54 +05:30
committed by GitHub
parent 1ce907625b
commit 1dc388653a
100 changed files with 293 additions and 319 deletions

View File

@ -8,7 +8,7 @@ package com.thealgorithms.dynamicprogramming;
public class RodCutting {
private static int cutRod(int[] price, int n) {
int val[] = new int[n + 1];
int[] val = new int[n + 1];
val[0] = 0;
for (int i = 1; i <= n; i++) {
@ -24,7 +24,7 @@ public class RodCutting {
}
// main function to test
public static void main(String args[]) {
public static void main(String[] args) {
int[] arr = new int[] { 2, 5, 13, 19, 20 };
int result = cutRod(arr, arr.length);
System.out.println("Maximum Obtainable Value is " + result);