6 remove unneded variable
This commit is contained in:
parent
fe9e21048f
commit
734fea77a6
|
@ -22,10 +22,9 @@
|
|||
|
||||
void bubble_sort(int array[], int size)
|
||||
{
|
||||
int shift = 0;
|
||||
for (int i = 1; i < size; ++i)
|
||||
{
|
||||
for (int j = 1; j < size - shift; ++j)
|
||||
for (int j = 1; j < size - i; ++j)
|
||||
{
|
||||
if (array[j] < array[j-1])
|
||||
{
|
||||
|
@ -34,7 +33,6 @@ void bubble_sort(int array[], int size)
|
|||
array[j-1] = temp;
|
||||
}
|
||||
}
|
||||
++shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue