0

```
for(i=0;i<n-1;i++)
{
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
count++;
}
}
}
```

```
void select(int a[],int n)
{
for(i=0;i<=n;i++)
{
k=i;
min=a[i];
for(j=i+1;j<=n-1;j++)
{
if(a[j]<min)
{
min=a[j];
k=j;
count++;
}
else count++;
}
a[k]=a[i];
a[i]=min;
}
}
```

which one is selection sort???first or sec??