Different operations of bubbling method

Na na na na, Jiang Zi, I have been troubled by a question these days, and a question just happened to come up, so I will briefly describe it.

A random number I wrote to judge whether the code I wrote is correct and the common bubbling method on the Internet. The pictures and conclusions are as follows
Insert image description here
This is a standard online bubbling method. Soaking method, the following one was written by me, but it has probably been used by the big guys qwq
Insert image description here
Both of them are sorted from small to large, but the conditions for the two are different. , one is greater than, the other is less than, the conclusion is that the bubbling method on the Internet is sorting from beginning to end, but it still has to go back to the first one, and what I wrote is from beginning to end, but there is no need to go back The first one is Jiang Zi. Slipping away

Guess you like

Origin blog.csdn.net/Andrew_dlu/article/details/104034571