CodePudding user response:
Bubble sort just judgment conditions change,CodePudding user response:
With bubble it is too bad to doYao is a simple O (n)
Why do you want to write O (n * n)
CodePudding user response:
Method 1: insertion sort judgment conditions change don't judge the size of the figure number is on the left is on the left and on the odd number is an even number on the right is inserted into theMethod 2: create a new array to put all the odd number of new array, then all the even Numbers in a new array
Way too much you with which looked at which to use