Given an array A[1..n], with distinct values and k with 1 ≤ k ≤
n. We want to return the k smallest element of A[1.....n], in
non-decreasing order. For example: A = [5, 4, 6, 2, 10] and k = 4,
the algorithm returns [2, 4, 5, 6]. There are at least the
following four approaches:
a. heapify A and then extract k elements one by one
b. sort the array (e.g. using MergeSort or HeapSort) and then
read the...