Algorithms/Sorting-bubble sort/c method 1
Appearance
void bubblesort(int a[], int len)
{
int i, j, tmp;
for(i = 0; i < len; i++)
{
for(j = 0; j < len - 1 - i; j++)
{
if(a[j] > a[j + 1])
{
tmp = a[j + 1];
a[j + 1] = a[j];
a[j] = tmp;
}
}
}
}