Skip to content

[FEATURE REQUEST] Golden Ration formula to find Nth Fibonacci number  #4505

@jstar2708

Description

@jstar2708

What would you like to Propose?

Golden ration formula

Problem statement : Find the nth Fibonacci number in O(1) time complexity.

Algorithm :

We can simply use the formula given below to find Nth Fibonacci number.

1/√5 * (0.5 * (( √5 + 1) ^ n) - (0.5 * ( 1 - √5) ^ n))

Issue details

So, the algorithm just uses formula for finding Nth Fibonacci number in O(1).

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions