Question: Exercise 6 Write a quicksort function of type int list > int list. Here's a review of the quicksort algorithm. First pick an element and
Exercise 6 Write a quicksort function of type int list > int list. Here's a review of the quicksort algorithm. First pick an element and call it the pivot. (The head of the list is an easy choice for the pivot.) Partition the rest of the list into two sublists, one with all the elements less than the pivot and another with all the elements not less than the pivot. Recursively sort the sublists. Combine the two sublists (and the pivot) into a final sorted list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
