Skip to content

rohan77700/Recursion-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Recursion-javascript

  • The Fibonacci Sequence (using both iterative and recursive methods)
  • Merge Sort (a recursive sorting algorithm)

Solutions

Fibonacci Sequence

  1. Using iteration

    • Starts with [0, 1] and keeps adding the last two numbers until length n.
  2. Using recursion

    • Builds the sequence by recursively generating fibsRec(n - 1) and adding the last two numbers to the end.

Merge Sort

  • Recursively splits the array into halves, sorts each half, and merges them back together in sorted order.

About

JavaScript recursion - the odin project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published