example 3-4 (quickselect incomplete)