Skip to content

Jaidev1805/Recursion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Recursion Project 🎯

This repository contains solutions to the exercises for the “Recursion” project from The Odin Project (JavaScript course).

What’s inside

  • fib.js — iterative implementation of generating the first n numbers of the Fibonacci sequence.
  • fibrs.js — recursive implementation to generate the first n Fibonacci numbers.
  • mergesort.js — recursive implementation of the Merge Sort algorithm that sorts arrays.

📚 Background

  • Recursion is a programming technique where a function calls itself in order to solve a problem by breaking it into smaller sub-problems.
  • In this project you practice recursion in two contexts:
    • Generating a Fibonacci sequence (learning base case & recursive step)
    • Sorting an array using Divide & Conquer via merge sort — splitting the array into smaller parts, sorting them recursively, then merging back.

Usage / How to run

  1. Make sure you have Node.js installed.
  2. From the command line, run your scripts. For example:
    node fibs.js       # runs the iterative Fibonacci generator  
    node fibsRec.js    # runs the recursive Fibonacci function  
    node mergeSort.js  # runs your merge sort implementation  

About

Recursion Project. Part of "The Odin Project" Curriculum.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published