2
answers
1
watching
255
views
commandosLv1
14 Sep 2022
The k-Quicksort algorithm is based on the following method for pivot selection.It starts by dividing the input array into k subarrays of equal size (except possibly forthe last one) and applies the classical pivot selection method and partition function oneach subarray (pivot is first element). Then the list of k pivots is sorted using Quicksortand the median x of the k pivots is selected to be used as pivot. Then the partitionfunction is applied to place x in its final position as usual. This is repeated (recursively)until the array is sorted.Does k-Quicksort have a better worst-case running time than the classical Quicksortalgorithm?
The k-Quicksort algorithm is based on the following method for pivot selection.It starts by dividing the input array into k subarrays of equal size (except possibly forthe last one) and applies the classical pivot selection method and partition function oneach subarray (pivot is first element). Then the list of k pivots is sorted using Quicksortand the median x of the k pivots is selected to be used as pivot. Then the partitionfunction is applied to place x in its final position as usual. This is repeated (recursively)until the array is sorted.Does k-Quicksort have a better worst-case running time than the classical Quicksortalgorithm?
25 Jan 2024
Read by 1 person
15 Sep 2022
Already have an account? Log in