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

https://github.com/estevanmaito/algorithms-in-javascript

Computer Science algorithms in JavaScript
https://github.com/estevanmaito/algorithms-in-javascript

algorithms computer-science computer-science-algorithms javascript javascript-algorithms

Last synced: 13 days ago
JSON representation

Computer Science algorithms in JavaScript

Awesome Lists containing this project

README

        

# Computer Science algorithms implemented in JavaScript

IN PROGRESS

Computer Science algorithms implemented in JavaScript, based mostly on these resources:

- [MIT 6.006 - Introduction to Algorithms](https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/index.htm)
- [Introduction to Algorithms - 3rd Edition](https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844)

## Usage

[If you want to test your knowledge](#test-your-knowledge)

[If you just want to see the algorithms](#algorithms)

### Test your knowledge

1. Clone and install dependencies

```
git clone https://github.com/estevanmaito/algorithms-in-javascript
cd algorithms-in-javascript
npm install
```

2. Delete the code above this line for every exercise:

```js
const test = require('tape')
```

3. Write code to make the tests pass

4. Run tests

```
node file-name.js
```

### Algorithms

Feel free to navigate around.

#### Data Structures

[Binary Search Tree](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/data-structures/binary-search-tree.js)

[Linked list](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/data-structures/linked-list.js)

[Queue](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/data-structures/queue.js)

[Stack](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/data-structures/stack.js)

#### Sorting

[Bubble sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/bubble-sort.js)

[Bucket sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/bucket-sort.js)

[Counting sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/counting-sort.js)

[Heap sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/heap-sort.js)

[Insertion sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/insertion-sort.js)

[Merge sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/merge-sort.js)

[Quick sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/quick-sort.js)

[Radix sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/radix-sort.js)

[Selection sort](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/sorting/selection-sort.js)

#### Searching

[Binary search](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/searching/binary-search.js)

[Breadth-first search](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/searching/breadth-first-search.js)

[Depth-first search](https://github.com/estevanmaito/algorithms-in-javascript/tree/master/searching/depth-first-search.js)