using quick sort partition to find the kth min number