Skip to content

Two different implementations for obtaining the nth Fibonacci number.

Notifications You must be signed in to change notification settings

thommahoney/Fibonacci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Fibonacci Numbers

This is a simple library of Fibonacci number solvers. Each implementation has two algorithms.

Algorithms

Fast

This implementation figures out each number sequentially, holding on to only the last two. Complexity: O(N)

Slow

This implementation calls itself recursively until it gets to the first and second numbers. Complexity: O(2^N)

Usage

Ruby

ruby fibonacci.rb <number> [number...]

Java

javac Fibonacci.java
java Fibonacci <number> [number...]

About

Two different implementations for obtaining the nth Fibonacci number.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages