Implementation of Munro-Paterson algorithm for computing k-order statistics in a stream.