An open API service indexing awesome lists of open source software.

https://github.com/nerddiffer/ds-algos

JS implementations of some data structures & algorithms
https://github.com/nerddiffer/ds-algos

Last synced: 12 months ago
JSON representation

JS implementations of some data structures & algorithms

Awesome Lists containing this project

README

          

# Data Structures & Algorithms

Javascript implementations of some classic data structures & algorithms. Most
of these, I am learning from a Coursera course, taught with Java.

## The menu

### Data structures

* Binary Heap
* max-oriented
* Linked List
* singly-linked
* Priority Queue
* ordered array implementation
* Queue
* linked list implementation
* Quick Find
* Quick Union
* unweighted implementation
* weighted implementation
* Stack
* array implementation
* linked list implementation
* Symbol Table

### Search data structures

* Binary Search Tree
* Interval Search Tree
* 1-dimensional intervals
* Ordered Symbol Table
* Red Black Tree (left-leaning)
* Sequential Search

### Sorting algorithms

* Insertion sort
* Merge sort
* top-down & bottom-up variations
* Quick sort
* variations with & without 3-way partitioning
* Selection sort
* Shell sort

Much of the decision making inside the algorithm itself has been abstracted
out into a library: [total-sorta](https://www.npmjs.com/package/total-sorta).

### Other things

Find these under `lib/misc/`

* Fisher-Yates shuffle
* Dijkstra's two-stack algorithm

## Usage

Run any of these commands in the terminal from the project root.

### Install dependencies

`npm install`

### Run tests

`npm test`

## Links

I'm following an online course in algorithms & data structures, the one with
Robert Sedgewick:

* [Course link](https://www.coursera.org/course/algs4partI)
* [Booksite](http://algs4.cs.princeton.edu/home/)