Update bubble-sort.cpp
parent
cd7e1af3fe
commit
c36bc74fde
|
@ -18,7 +18,7 @@ int main()
|
|||
{
|
||||
swap = false;
|
||||
for (int j= 0; j< n-1; j++)
|
||||
{ //comparing adjecent elements of array
|
||||
{ //comparing adjacent elements of array
|
||||
if (arr[j]>arr[j+1])
|
||||
{ // swapping array elements
|
||||
temp = arr[j];
|
||||
|
|
Loading…
Reference in New Issue