3. Let T₁...n be a sorted array of distinct integers, some of which may be negative. = (a) Design a (log n) Divide and Conquer algorithm that finds an index i such that 1 ≤ i ≤n and Ti i or correctly reports that such an index does not exist. Prove that your algorithm runs in O(log n) in all cases. (b) Suppose that we also know that T₁ computes the index i such that Ti exist. = 0. Design an even faster algorithm that either i or correctly reports that such an index does not
3. Let T₁...n be a sorted array of distinct integers, some of which may be negative. = (a) Design a (log n) Divide and Conquer algorithm that finds an index i such that 1 ≤ i ≤n and Ti i or correctly reports that such an index does not exist. Prove that your algorithm runs in O(log n) in all cases. (b) Suppose that we also know that T₁ computes the index i such that Ti exist. = 0. Design an even faster algorithm that either i or correctly reports that such an index does not
Related questions
Question
in the 3b, is T[1] > 0
![3. Let T₁...n be a sorted array of distinct integers, some of which may be negative.
=
(a) Design a (log n) Divide and Conquer algorithm that finds an index i such that 1 ≤ i ≤n
and Ti i or correctly reports that such an index does not exist. Prove that your
algorithm runs in O(log n) in all cases.
(b) Suppose that we also know that T₁
computes the index i such that Ti
exist.
=
0. Design an even faster algorithm that either
i or correctly reports that such an index does not](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa1b4955a-9826-4ecf-bd95-961095aec760%2F5eef53da-7724-422b-a19d-7824f877c23c%2F7xdeohm_processed.png&w=3840&q=75)
Transcribed Image Text:3. Let T₁...n be a sorted array of distinct integers, some of which may be negative.
=
(a) Design a (log n) Divide and Conquer algorithm that finds an index i such that 1 ≤ i ≤n
and Ti i or correctly reports that such an index does not exist. Prove that your
algorithm runs in O(log n) in all cases.
(b) Suppose that we also know that T₁
computes the index i such that Ti
exist.
=
0. Design an even faster algorithm that either
i or correctly reports that such an index does not
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)