Completed quick select for array of integers