// return index i such that A[i] = x, return -1 if x is notfound
int mysearch(A, left, right, x) {
//add statements
}
(a) (10 pts) Given a sorted array A of size n, i.e. data hasbeen sorted. Give a Divide and Conquer recursive “mysearchâ€algorithm which first tests the element at position n/4 forequality with some value x, and then possibly checks the element atposition 3n/4. The result is either discovering x or reducing theset size to a fraction of the original.
(b) (5 points) Give the recurrence equation of mysearchalgorithm.
(c) (5 points) Give the best-case and worst-case runtimecomplexity of mysearch algorithm? Explain your answer
(d) (5 points) What is the average-case runtime complexity ofmysearch algorithm? Explain your answer. Show transcribed imagetext // return index i such that A[i] = x, return -1 if x is notfound int mysearch(A, left, right, x) { //add statements }