https://github.com/charlesstover/quicksort-js
An implementation of Quicksort in JavaScript/TypeScript.
https://github.com/charlesstover/quicksort-js
javascript js npm npmjs quicksort sorting-algorithms travis travis-ci travisci typescript
Last synced: 5 months ago
JSON representation
An implementation of Quicksort in JavaScript/TypeScript.
- Host: GitHub
- URL: https://github.com/charlesstover/quicksort-js
- Owner: CharlesStover
- License: mit
- Archived: true
- Created: 2018-11-20T15:17:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-24T05:21:53.000Z (over 4 years ago)
- Last Synced: 2025-01-22T02:17:20.631Z (5 months ago)
- Topics: javascript, js, npm, npmjs, quicksort, sorting-algorithms, travis, travis-ci, travisci, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@charlesstover/quicksort
- Size: 133 KB
- Stars: 61
- Watchers: 5
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quicksort [](https://twitter.com/intent/tweet?text=You%20can%20sort%20arrays%20with%20Quicksort%20in%20JavaScript%20with%20this%20Node%20module.&url=https://github.com/CharlesStover/quicksort-js&via=CharlesStover&hashtags=algorithm,algorithms,javascript,programming,typescript,webdev,webdeveloper,webdevelopment)
An implementation of Quicksort in JavaScript.
A walkthrough of the logic behind Quicksort and development of this package can be found on the Medium article [Implementing Quicksort in JavaScript](https://medium.com/@Charles_Stover/implementing-quicksort-in-javascript-8044a8e2bf39).
[](https://www.npmjs.com/package/@charlesstover/quicksort)
[](https://www.npmjs.com/package/@charlesstover/quicksort)
[](https://www.npmjs.com/package/@charlesstover/quicksort)
[](https://www.npmjs.com/package/@charlesstover/quicksort)
[](https://travis-ci.com/CharlesStover/quicksort-js/)## Install
* `npm install @charlesstover/quicksort --save` or
* `yarn add @charlesstover/quicksort`## Examples
```JavaScript
import quickSort from '@charlesstover/quicksort';
import { expect } from 'chai';describe('Quicksort', () => {
it('should sort an array', () => {
const unsorted = [ 5, 4, 1, 3, 2 ];
const sorted = quickSort(unsorted);
expect(sorted).to.deep.equal([ 1, 2, 3, 4, 5 ]);
});
});
```