Question: Suppose T is not found by Binary Search #2; then, in the last comparison, A[ p] T. (a) Show that if 1 < p <
Suppose T is not found by Binary Search #2; then, in the last comparison, A[ p] T.
(a) Show that if 1 < p < n, then A[ p 1] < T < A[ p].
(b) Show that if 1 = p < n, then T < A[ 1].
(c) Show that if 1 < p = n, then A[ n 1] < T < A[ n] or A[ n] < T
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
