// Recursive Selection Sort
int Min_Ind(int A[], int i, int N)
{
	int k, MI;
	MI = i;
	for (k = i+1; k < N; k++)
		if (A[k] < A[MI])
			MI = k;
	return MI;
}
void Selection_Sort(int A[], int i, int N)
{
	if (i == N-1) 
		return;
	else
	{
		int MI, Temp; 
		// MI is the index of the minimum in 
		// the subarray whose indices start at 
		// i and end at N-1.
		// Find MI.
		MI = Min_Ind(A,i,N);
		// Swap the element at index i with 
		// the element at index MI.
		Temp = A[i];
		A[i] = A[MI];
		A[MI] = Temp;
		Selection_Sort(A,i+1,N);
	}
}

