This repository is part of The Odin Project's Ruby Recursion lesson. It contains examples of recursive algorithms implemented in Ruby, specifically focusing on the Fibonacci sequence and the merge sort algorithm.
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones, usually starting with 0 and 1. The fibs
method generates this sequence iteratively, while the fibs_rec
method generates it recursively.
The merge sort algorithm is an efficient, stable sorting algorithm that works by dividing the unsorted list into n sublists, each containing one element (a list of one element is considered sorted), and then repeatedly merging sublists to produce new sorted sublists until there is only one sublist remaining.
These examples are designed to help understand the concept of recursion and how it can be used in Ruby programming.