This file implements some functions to pick elements from arrays, either randomly or deterministically. Its most interesting functions are the ones that find the k-th element of an array and the median of an array in linear time using a the so-called Median of medians recursive algorithm (cf Wikipedia and also Russell Cohen's page).

Index

Functions