Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2017/imperative-programming/2/c/solution

The public rank is one-based, whereas Find uses a zero-based index:
function Select(i; var a; N): T
    require 1 <= i <= N
    return Find(i-1,a,0,N)
Thus rank is index . The boundary ranks return the minimum and maximum, and repeated values occupy as many ranks as their multiplicities in the multiset.

New to topics? Read the docs here!