2. (20 points) Let A be a list of n (not necessarily distinct) integers. Describe a (n) algorithm to test whether any item appears more than [n/2] times in A. Call your function Test, write down its pseudo code and explain why the run time is e(n). Hint: Note that if an element occurs more thană€Œn/2] times in A, it must be median of A (why?). You can use the “black-box” subroutine from
OR
OR