Question: Professor Holmes has come up with a new sorting algorithm. He calls it Trinary Sort and claims that it is asymptotically faster than Merge Sort,
Professor Holmes has come up with a new sorting algorithm. He calls it Trinary Sort and claims that it is asymptotically faster than Merge Sort, despite the fact both the algorithms operate using similar logic. But, unlike Merge Sort, Trinary Sort splits the input array into roughly equal parts at each step of the recursion as long as the array is splittable ie has at least elements Trinary Sorts merge subroutine, similar in principle to the one used by Merge Sort, takes sorted subarrays and merges them to produce a single sorted array. Given all of this, answer the following questions. a points In Merge Sort, the merge subroutine makes n comparisons to merge arrays of size n which takes Theta n time. How many comparisons will the merge subroutine of Page of Trinary Sort make to merge arrays of size n What would be the Theta bound on the running time for this subroutine?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
