Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/pangiole/algojs

Algorithms in Javascript
https://github.com/pangiole/algojs

Last synced: 30 days ago
JSON representation

Algorithms in Javascript

Awesome Lists containing this project

README

        

# algojs

[![Build Status][travis-image]][travis-url]

It provides Javascript implementation of fundamental data types, algorithms, and data structures.

## Examples
Here there are some examples. API docs are published here.

```
npm install algojs --save
```

### Sorting
```javascript
var sort = require('algojs-sorting').insertionSort;

var array = [7,2,4,3,1,5,6,8];
sort(array);
// array is now sorted
```

### Others
```javascript
var algojs = require('algojs');

var points = [];
var convexHull = algojs.grahamScan(points);
```

[travis-image]: https://travis-ci.org/angiolep/algojs.svg?branch=master
[travis-url]: https://travis-ci.org/angiolep/algojs