OpenGenus/cosmos

Fibonacci computed using Lucas's identities

Open

#2.687 geöffnet am 29. Okt. 2017

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C++ (3.724 Forks)batch import
Hacktoberfestadd codenew algorithm

Repository-Metriken

Stars
 (13.462 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

This is a(n):

  • New algorithm
  • Update to an existing algorithm
  • Error
  • Proposal to the Repository

Details: Missing an example of Fibonacci number computation uses Lucas's identity. It computes the n-th Fibonacci number in O(log(n)). The implementation is much shorter and easier than well-known matrix based approach.

Contributor Guide