#include
#include
void main()
{
int i,j,select[]={12,24,36,32,78},k;
printf("Bubble Sort\n");
for(i=5;i>1;i--)
{
for(j=0;j
{
k=select[j];
select[j]=select[j+1];
select[j]=k;
}
}
}
for(i=0;i<5;i++)
printf("%d\n",select[i]);
}
}
Subscribe to:
Post Comments (Atom)
any one can calculate the time complexity of this algorithm.
Please post soon....