1.0.2 • Published 1 year ago

ts-sort v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ts-sort npm npm

🪄 Sorting Utilities!

📦 Installation:

npm install ts-sort

⚡️ Usage:

import { qsortRecur } from 'ts-sort';

💎 API:

The API covers the following methods:

MethodTypeRuntimes
qsortRecurQuickSort RecursiveT = O(n log n), S = O(1) -> T: O(n^2) worst-case
qsortIterQuickSort In-PlaceT = O(n log n), S = O(n) -> T: O(n^2) worst-case
selSortSelectionSort RecursiveT = O(n^2), S = O(n)
selSortInplaceSelectionSort In-PlaceT = O(n^2), S = O(1)
mergeSortMergeSortT = O(n log(n)), S = O(n) {STABLE}
bucketSortBucketSortT = O(n+k), S = O(n+k) {STABLE}
bubbleSortBubbleSortT = O(n^2), S = O(1)
insertionSortInsertionSortT = O(n^2), S = O(1) {STABLE}
radixSortRadixSortT = O(d * (n + max)), S = O(max) {STABLE}
countingSortCountingSortT = O(n + max), S = O(max) {STABLE}
countingSortNegCountingSort NegativesT = O(n + max), S = O(max) {STABLE}

🔑 License

MIT