Adding algorithm for finding order statistic in linear time