Re:Data structures and algorithms I actually used while work...
by duskwuff on Wednesday July 15, 2020 @07:06PM
(#23853491)
You don't even need a loop. Binet's formula gives a closed-form expression for the Fibonacci sequence. (And of course I don't remember that formula off the top of my head, but I know it exists, so I'd be 90% of the way to solving a problem which required it.)
[ Parent
| on HN ]