Posts by Pedro Neri • 1 point
1 post
-
-2
votes6
answers7179
viewsA: Simple Solution for Fibonacci Algorithm
public class Program { public static void main(String[] args) { Stream<Long> limit = Stream.iterate(new Long[] { 0L, 1L }, par -> new Long[] { par[1], par[0] + par[1] }) .map(par ->…