Skip to content

Commit 77eedbe

Browse files
committed
Fix: add newline at the end of RodCutting.java
1 parent fd2f306 commit 77eedbe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/thealgorithms/dynamicprogramming/RodCutting.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static int cutRod(int[] price, int n) {
2525
if (n < 0) {
2626
throw new IllegalArgumentException("Rod length cannot be negative.");
2727
}
28+
2829
// Create an array to store the maximum obtainable values for each rod length.
2930
int[] val = new int[n + 1];
3031
val[0] = 0;
@@ -43,4 +44,5 @@ public static int cutRod(int[] price, int n) {
4344
// The final element of 'val' contains the maximum obtainable value for a rod of length 'n'.
4445
return val[n];
4546
}
46-
}
47+
}
48+

0 commit comments

Comments
 (0)