mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Remove unnecessary code (#4141)
This commit is contained in:
@@ -24,9 +24,7 @@ public class WineProblem {
|
||||
int start = WPRecursion(arr, si + 1, ei) + arr[si] * year;
|
||||
int end = WPRecursion(arr, si, ei - 1) + arr[ei] * year;
|
||||
|
||||
int ans = Math.max(start, end);
|
||||
|
||||
return ans;
|
||||
return Math.max(start, end);
|
||||
}
|
||||
|
||||
// Method 2: Top-Down DP(Memoization)
|
||||
|
||||
Reference in New Issue
Block a user