My JavaScript algorithms learnings.
This repo provides information on common algorithms, solutions, their time and space complexity.
A summary of the algorithms are found here.
These algorithms are grouped together as below:
- Calculate the sum of a number up to that number
- Primality
- Fibonacci
- Find the smallest number in an array
- Find the even and odd numbers
- Calculate the sum of an array
- Check is a number is a power of two
- Factorial Algorithm
- Fibonacci (with Recursion)
- Fibonacci (with Recursion and Memoization ie: dynamic programming)
- Problem Solving tips
- Knapsack problem
- Greedy vs Dynamic Algorithms
- Change Making - Greedy vs Brute Force
Each algorithm group will have sub-folders that contain:
- Readme explaining the algorithm
- Solution
- Test folder
To run the tests:
- Install node dependencies
npm i
- Run tests
npm run test
- Data Structures: Understand what data structures exists, how they work and when you use them.