[−][src]Crate fast_fibonacci
fast-fibonacci
fast-fibonacci
uses linear recurrence to quickly find fib(n, mod) in O(log(n)) time.
Adapted from http://fusharblog.com/solving-linear-recurrence-for-programming-contest/
Functions
bigfib_with_mod | BigUint version of fib_with_mod. Finds the nth fibonacci number with modulo. Runtime O(log(n)) |
fib_with_mod | Finds the nth fibonacci number with modulo. Runtime O(log(n)) |