1. (20 points) Suppose we have at our disposal a worst-case linear-time median subroutine called “black-box”, which takes an Array A containing n elements as input and returns the median element of A in linear time (O(n)) in the worst case. Give a simple, linear-time algorithm that uses “black-box” as a subroutine and returns the ith smallest element of A in linear time. Call your function Select, write down its pseudo code, recurrence relation and solve the recurrence
OR
OR