added O(n) solution to finding the ith order statistic