https://github.com/aeharding/timeout-sort
Timeout sort is an asynchronous integer sorting algorithm. It can sort all integers with O(max(input)+n).
https://github.com/aeharding/timeout-sort
Last synced: 3 months ago
JSON representation
Timeout sort is an asynchronous integer sorting algorithm. It can sort all integers with O(max(input)+n).
- Host: GitHub
- URL: https://github.com/aeharding/timeout-sort
- Owner: aeharding
- License: mit
- Created: 2015-08-04T17:34:38.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-12T20:22:55.000Z (over 10 years ago)
- Last Synced: 2025-01-26T11:23:01.382Z (over 1 year ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# timeout-sort
Timeout sort is an asynchronous integer sorting algorithm. It can sort all integers (+ & -) with O(max(abs(input))+n).
```js
var timeoutSort = require("timeout-sort");
// callback form
timeoutSort([5, 20, 642, -80], function cbSort(sortedArray, err) {
if (err) console.log("You suck!");
console.log(sortedArray);
});
// promise form
timeoutSort([5, 20, 642, -80]).then(function resolvedWithSort(sortedArray) {
console.log(sortedArray);
});
```
## Development
`npm install -g mocha coffee-script`
then
`npm start` (to compile)
`npm test`