Awesome Open Source
Awesome Open Source

Collection of Algorithms and Data Structures

Starting

  1. run npm install
  2. Select Algo/Data Structure you want to work on
  • remove x from xdescribe in the .test.js file
  • Add .only to the first describe in the .test.js file
  • like so: describe.only('FANCY ALGO', () => {})
  1. run npm test
  2. ???
  3. Profit

Description

Each folder contains the solution, an empty file, and a file for the test specs. Most files also include a README describing the data structure or algo as well as the functions you need to implement.

Most of these implementations are what I have learned from the Coursera Princton Introduction to Algos Course, Part 1 and 2, and at Fullstack Academy. Although the Coursera course is in Java, I've implemented it in JavaScript.

I have written extensive test specs so others can use this repo to do test first learning. And also to check if the functions I wrote were actually doing what they were supposed to 😂.

Note:

A couple of the algorithms and data structures do not yet have test specs. Also the README's could be better. Will get on that...eventually...

Said Stuff:

  1. Test Specs
  • All sorting algos
  • KnuthShuffle
  • Heap Sort Readme
  • Graphs
    • bfs
    • dfs
  1. Write better README's for sorting algos

Coming Soon:

  1. Suffix Tree
  2. Topological Sort (using Tarjan's algorithm)
  3. Dijkstra's Algorithm
  4. Longest Common Subsequence (using dynamic programming)
  5. Knapsack Problem (using dynamic programming)
Alternatives To Algos And Data Structures
Select To Compare


Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,048,460
Algorithms (37,394
Structure (10,195
Data Structures (9,500
Test Driven Development (4,125
Coursera (2,489
Computer Science (2,213