This commit is contained in:
salonilakhotia
2019-10-12 10:25:40 +05:30
parent 51f36068a1
commit f5752234b4

View File

@ -16,11 +16,11 @@ public class Fibonacci {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine()); int size = Integer.parseInt(br.readLine());
// Methods all returning [0, 1, 1, 2, 3, 5, ...] for n = [0, 1, 2, 3, 4, 5, ...] // Methods all returning [0, 1, 1, 2, 3, 5, ...] for n = [0, 1, 2, 3, 4, 5, ...]
System.out.println(fibMemo(n)); System.out.println(fibMemo(size));
System.out.println(fibBotUp(n)); System.out.println(fibBotUp(size));
} }
/** /**