2019329621175_4_2 张子行 Version 0 |
|
👤 Author: by 1148873699qqcom 2019-10-29 12:10:58 |
Compare adjacent elements. If the first one is bigger than the second, exchange them for two.
Do the same for each pair of adjacent elements, starting with the first pair and ending with the last pair. At this point, the last element should be the largest number.
Repeat the above steps for all elements except the last one.
Continue to repeat the above steps each time for fewer and fewer elements until no pair of numbers needs to be compared.