OpenGenus/cosmos

Fibonacci computed using Lucas's identities

Open

#2.687 aberto em 29 de out. de 2017

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)C++ (3.724 forks)batch import
Hacktoberfestadd codenew algorithm

Métricas do repositório

Stars
 (13.462 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador