linear algorithm for finding kth item in an unordered list