`

4 ways to build a Fibonacci series in Java

Type the nth number in the fibonacci sequence?

Algorithm comparison

Method Time Number List
For 72000 1 [0, 1]
While 38000 1 [0, 1]
Recursion 41000 1 [0, 1]
Stream 189000 1 [0, 1]

Contact Us