Sort numbers in O(kN) time using JavaScript's typed arrays.