mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-14 17:32:35 +08:00
Merge branch 'master' into master
This commit is contained in:
@ -12,6 +12,7 @@ public class Fibonacci {
|
||||
|
||||
private static Map<Integer, Integer> map = new HashMap<>();
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// Methods all returning [0, 1, 1, 2, 3, 5, ...] for n = [0, 1, 2, 3, 4, 5, ...]
|
||||
|
@ -26,7 +26,8 @@ public class RodCutting {
|
||||
public static void main(String args[]) {
|
||||
int[] arr = new int[]{2, 5, 13, 19, 20};
|
||||
int size = arr.length;
|
||||
int result = cutRod(arr,size);
|
||||
System.out.println("Maximum Obtainable Value is " +
|
||||
cutRod(arr, size));
|
||||
result);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user