3. 7.3.12 Professor T. R. S. Eighty proposes the following version of binary search:
1. binary - search2(s, i, j, key)
2. if (i > j)
3. return 0
4. k = ?(i + j)/2?
5. if (key == s_k)
6. return k
7. k1 = binary - search2(s, i, k - 1, key)
8. k2 = binary - search2(s, k + 1, j, key)
9. return k1 + k2
(a) (5 pts) Show that binary - search2 is correct; that is, if key is present, the algorithm returns its index, but if key is not present, it returns 0.
(b) (5 pts) Find the worst case running time of binary-search2.