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
- Host: GitHub
- URL: https://github.com/vadim-geroim/fibonacci
- Owner: vadim-geroim
- Created: 2019-11-09T21:40:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-14T01:30:22.000Z (over 6 years ago)
- Last Synced: 2025-01-13T08:12:32.095Z (over 1 year ago)
- Topics: algorithms, rspec, ruby
- Language: Ruby
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`