Question: a question in algorithm .A co mputer science professor proposed using trinary search - in which the list is split into segments -to improve on

a question in algorithm a question in algorithm .A co mputer science professor proposed using "trinary

.A co mputer science professor proposed using "trinary search" - in which the list is split into segments -to improve on the binary search algorithm on a sorted list. Part of his pro code appears below. rinarysearch (int value, int[1 a, int highIndex, int lowIn return1 int midIndex1 = (lowindex + high Index) /3; if (lowIndex > highIndex) // not found else int midIndex2 2*(1owindex + highIndex) /3; YOUR CODE TO cOMPLETE THE ALGORITHM GOES HERE!! a. Write the missing code in the algorithm above. Write a recurrence relation for the time complexity of your algorithm, and solve i the time complexity. Is the professor's proposed trinary search algorithm a substantial improvement c search? Explain why or why not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!