# algs4js

> Basic algorithms and data structures implemented with es6

Latest version **0.0.9** (published 2016-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install algs4js
pnpm add algs4js
yarn add algs4js
bun add algs4js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2016-11-22 |
| First published | 2016-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.6.1 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bob Brady |
| Maintainers | digibrady |
| Keywords | algorithms, data, structures, es6 |

## Links

- npm: https://www.npmjs.com/package/algs4js
- Repository: https://github.com/bobbrady/algs4js
- Homepage: https://github.com/bobbrady/algs4js#readme
- Issues: https://github.com/bobbrady/algs4js/issues
- npm.io page: https://npm.io/package/algs4js

## Dependencies (1)

- [winston](https://npm.io/package/winston.md) ^2.3.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.0.9 (latest) — 2016-11-22
- 0.0.8 — 2016-11-08
- 0.0.7 — 2016-11-08
- 0.0.5 — 2016-11-08
- 0.0.4 — 2016-11-08
- 0.0.3 — 2016-11-08
- 0.0.2 — 2016-11-08
- 0.0.1 — 2016-11-08

## README

# Algorithms and Data Structures with ES6
This repo contains basic algorithms and data structures implemented with ES6.

It provides the following features:
* Basic Algorithms with Data Structures
* Sorting: quicksort, mergesort, heapsort
* Dynamic Programming: factorial, max sub array
* Misc
  * String interview questions (reverse, palindrome)
  * Decimal-to-Roman-Numeral conversion
  * Chess knight shortest path
* Code written in ES6
* Babel transpiling through a simple gulp task
* Linting with eslint using the AirBnB rules
* Unit tests with mocha
* Test coverage metrics with instanbul
* Latest modules used for all dependencies, including babel v6
* JSDoc style comments used to document the code

## Functionality
| Function | Algorithm | ES5 Requires | ES6 Import  |
| :-------------|:-------------|:------------------------|:-------------------------|
|Sorting | Quick Sort | var QuickSort = require('algs4j').QuickSort | import { QuickSort} from 'algs4j' |
|Sorting | Merge Sort | var MergeSort = require('algs4j').MergeSort | import { MergeSort} from 'algs4j' |
|Sorting | Heap Sort | var HeapSort = require('algs4j').HeapSort | import { HeapSort} from 'algs4j' |
|Dynamic Programming | Factorial | var Factorial = require('algs4j').Factorial | import { Factorial} from 'algs4j' |
|Dynamic Programming | Max Sub Array | var MaxSubArray = require('algs4j').MaxSubArray | import { MaxSubArray } from 'algs4j' |
|Misc String Algs| Palindrome, Reverse | var SimpleStringAlgs = require('algs4j').SimpleStringAlgs | import { SimpleStringAlgs } from 'algs4j' |
|Misc Decimal to Roman| Conversion | var DecimalToRomanNumeral = require('algs4j').DecimalToRomanNumeral | import { DecimalToRomanNumeral } from 'algs4j' |
|Misc Knight's Shortest Path| Breadth First Search | var KnightShortestPath = require('algs4j').KnightShortestPath | import { KnightShortestPath } from 'algs4j'|

## Usage
```javascript
import { QuickSort } from 'algs4j';

const arr = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
console.log(`Unsorted Arr: ${arr}`);
QuickSort.sort(arr);
console.log(`Sorted Arr: ${arr}`);
// arr is now [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
```

---
_Source: https://npm.io/package/algs4js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
