[bonus] A Linearithmic Sort [+15 points] Implement the function void fast_sort(int a[], int n), which receives an array
Posted: Mon Jun 06, 2022 12:21 pm
[bonus] A Linearithmic Sort [+15 points] Implement the function void fast_sort(int a[], int n), which receives an array and its size and sorts it in O(n log k) expected time, where n is the number of elements in the array and k is the number of distinct elements in the array. You are not allowed to use the STL sort function, Heapsort, Quicksort, Mergesort, Shell Sort, Comb Sort, Radix Sort, Bucket Sort, or Counting Sort. You are allowed to add and use freq.h from Exercise 1.