`

4 ways to build a Fibonacci series in Java

Type the nth number in the fibonacci sequence?

Algorithm comparison

Method Time Number List
For 49000 1 [0, 1]
While 22000 1 [0, 1]
Recursion 40000 1 [0, 1]
Stream 177000 1 [0, 1]

Contact Us