Question: 1. Modified partition. (a) Write a modified version of the partition algorithm that splits the list in three parts instead of two, using the first
1. Modified partition. (a) Write a modified version of the partition algorithm that splits the list in three parts instead of two, using the first and last elements of the list as pivots. Your modified partition algorithm must work in linear time. (b) Write a modified version of quicksort that uses your modified partition algorithm. (c) Write a recurrence relation for the best case time complexity of your modified quicksort algorithm (d) Solve the recurrence relation for your modified quicksort algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
