/** * Sort an array of numbers in-place and in ascending order using bucket sort. * * Note that the traditional bucket sort algorithm does not work on negative numbers. * Thus, the below algorithm is modified such that any negative numbers in the array are converted * to positive numbers and sorted separately from the original positive numbers. * * Time complexity: * - O(n + k) average * - O(n^2) worst case * - where n is the number of array elements and k is the number of buckets * * Space complexity: O(n*k) * * @param arr - array of numbers to sort * @param posBuckets - (Optional) number of buckets to use when sorting positive array elements * @param negBuckets - (Optional) number of buckets to use when sorting negative array elements */ declare const bucketSort: (arr: number[], posBuckets?: number, negBuckets?: number) => void; export default bucketSort; //# sourceMappingURL=bucket-sort.d.ts.map