what is selection sort
Answers
Answered by
0
a combination of selection ans sorting
Answered by
3
selection sort:- Is used to arrange the data in ascending or descending order.
Code for selection sort:-
void SSort(int a[],int n)
{
int i,j;
for(i=0;i<n-1;i++)
{
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
int temp;
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
}
Similar questions