You are given an array A of n distinct numbers A = [a1, a2, …, an]
Provide an O(n) algorithm that returns the 3rd, 4th, and 5thsmallest numbers in that array.
More generally, provide an O(n) algorithm that returns all theorder statistics between i and j, where i < j (3 to 5 in thiscase)
I know that you can use the randomized quicksort but
Expert Answer
An answer will be send to you shortly. . . . .