Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

bubble sort c

int count; int aux; int array[count];
for (int i = 0; i < count; i++)
{
	for (int j = 0; j < count - 1; j++)
	{
		if (array[j] > array[j + 1])
		{
			aux = array[j];
			array[j] = array[j+1];
			array[j+1] = aux;
		}
	}
}
 
PREVIOUS NEXT
Tagged: #bubble #sort
ADD COMMENT
Topic
Name
8+9 =