An open API service indexing awesome lists of open source software.

https://github.com/vadim-geroim/fibonacci

Fibonacci Sequence: contains iterative and recursive solutions, tests and logs time performance
https://github.com/vadim-geroim/fibonacci

algorithms rspec ruby

Last synced: about 2 months ago
JSON representation

Fibonacci Sequence: contains iterative and recursive solutions, tests and logs time performance

Awesome Lists containing this project

README

          

# Fibonacci Sequence

## Project structure
- `lib/fibonacci.rb` - contains solution
- a method called recursive_fib solves this problem by using a recursive solution.
- a method called iterative_fib solves this problem by using an iterative solution.

- `spec/fibonacci_spec.rb` - tests on methods and time performance
- The ruby Benchmark module is used to test the time difference for both solutions

## Test execution
- Run `bundle install`
- Open terminal window
- From the project directory run `rspec`