Introduction - If you have any usage issues, please Google them yourself
(1) Input: A sequence of n numbers <a1, a2, . . .,an>.
Output: A permutation (reordering) <a1’, a2’, . . .,an’> of the input sequence such that a1’ a2’ . . . an’
(2) Input: A set A of n (distinct) numbers and a number i, with 1 ≤ i ≤ n.
Output: The element x∈ A that is larger than exactly i- 1 other elements of A.