Question: Exercise 8 (20 points) We consider a sorted array of distinct integers indexed from 1 ton a) Find an algorithm, whose temporal complexity is O(lg(n))

 Exercise 8 (20 points) We consider a sorted array of distinct

Exercise 8 (20 points) We consider a sorted array of distinct integers indexed from 1 ton a) Find an algorithm, whose temporal complexity is O(lg(n)) in the worst case, and which finds an index 1 sisn, such that tab[i] = i, provided that such an index exist. b) Demonstrate the temporal complexity of your algorithm with the master theorem c) Explain (informally) why your algorithm is correct. d) Can we find such an efficient algorithm if the integers are not distinct? Why

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!