void select(int array[],int n)
{
int i,j,key;
int temp1;
int temp;//=array[0];
int low,high,mid;
//temp1=array[0];
for(i=1;i<n;i++)
{
//j=i-1;
temp=array[i];
low=0;
high=i-1 ;
while(low<=high)
{
mid=(low+high)/2;
if(array[mid]>temp)
{
high=mid-1;
//j=high;
}
else
{
low=mid+1;
}
}
for(j=i-1;j>=high+1;j–)
{
array[j+1]=array[j];
}
array[high+1]=temp;
}
}