📶 Sorting
© xkcd.com
Sorting algorithms for JavaScript. See docs. Parent is js-algorithms.
🏗️ Caveat emptor! This is work in progress. Code may be working. Documentation may be present. Coherence may be. Maybe.
import {isSorted} from '@comparison-sorting/is-sorted';
import {increasing, decreasing} from '@total-order/primitive';
isSorted(increasing, [1, 2, 3], 0, 3); // true
isSorted(decreasing, [1, 2, 3], 0, 3); // false
This package has several children:
- 📔 @comparison-sorting/specification: Comparison sorting specification for JavaScript
- 🍃 @comparison-sorting/heap-sort: heapsort for JavaScript
- 🐇 @comparison-sorting/quick-sort: quicksort for JavaScript
- ⏪ @comparison-sorting/insertion-sort: Insertion sorting algorithms for JavaScript
- 🤺 @comparison-sorting/merge-insertion-sort: Ford-Johnson algorithm for JavaScript
- 🐉 @comparison-sorting/merge-sort: mergesort for JavaScript
- 🎼 @comparison-sorting/odd-even-merge-sort: Batcher's odd-even mergesort for JavaScript
- 🌖 @comparison-sorting/merging: merging for JavaScript
- 🍰 @comparison-sorting/partition: partition for JavaScript
- 👇 @comparison-sorting/selection: selection for JavaScript
- 🍢 @integer-sorting/radix-sort: Radix sorting algorithms for JavaScript
- js-countingsort: countingsort for JavaScript
- js-bucketsort: bucketsort for JavaScript