counting-sort

0.1.1 • Public • Published

counting-sort

Stability: 1 - Experimental

Counting sort.

Usage

var countingSort = require('counting-sort');
...
var ascending  = countingSort(array);                   // sort ascending
var descending = countingSort(array, undefined, false); // sort descending

Overview

Criteria for using counting sort requires that all inputs be integers from 0 to k, for some integer k.

Counting sort has the fun property of running in O(n) time if it's criteria are met.

Readme

Keywords

none

Package Sidebar

Install

npm i counting-sort

Weekly Downloads

4

Version

0.1.1

License

MIT

Last publish

Collaborators

  • tristanls