📅  最后修改于: 2022-03-11 14:44:46.043000             🧑  作者: Mango
void bubbleSort(int *arr, int n)
{
for(int i=0; iarray[j+1])
{
flag = true;
int temp = array[j+1];
array[j+1] = array[j];
array[j] = temp;
}
}
// No Swapping happened, array is sorted
if(!flag){
return;
}
}
}