Home > Back-end >  The bubble sort here how to modify
The bubble sort here how to modify

Time:09-26

CodePudding user response:

for(i=0; i <4-1; I++)
{
For (j=0; J & lt; 4-1 - I; J++)
{
//here it is ok to exchange swap
}
}

CodePudding user response:

The above is wrong
for(i=0; i <4-1; I++)
{
For (j=0; J & lt; 4-1 - I; J++)
{
Should just loop problem,//
}
}

CodePudding user response:

You put the second parameter of bubble sort method to type int
  • Related