Adding quick select algorithm to select the top k element in a array.