// RandomizedSelectNth select n-th (n start by 1) order statistic from the input array,
// return the index of the n-th element if succeed, -1 if failed.
// based on randomizedPartition() of quicksort
RandomizedSelectNth select n-th (n start by 1) order statistic from the input array,
return the index of the n-th element if succeed, -1 if failed.
based on randomizedPartition() of quicksort
// RandomizedSelectNth select n - th ( n start by 1 ) order statistic from the input array // return the index of the n - th element if succeed - 1 if failed . // based on randomizedPartition () of quicksort
func RandomizedSelectNth(in myInterface, n int) int {
	if n <= 0 || n > in.Len() {
		return -1
	}
	return randomizedSelectImplByLoop(in, n-1, 0, in.Len()-1)
}
func RandomizedSelectNth ( in myInterface , n int ) int { if n <= 0 || n > in . Len ( ) { return - 1 } return randomizedSelectImplByLoop ( in , n - 1 , 0 , in . Len ( ) - 1 ) }
RandomizedSelectNth select n-th (n start by 1) order statistic from the input array,
return the index of the n-th element if succeed, -1 if failed.
RandomizedSelectNth select n - th ( n start by 1 ) order statistic from the input array return the index of the n - th element if succeed - 1 if failed .
//return selectImplByRescurse(in, n-1, 0, in.Len()-1)