吉姆很轻松地就完成了,他从冒泡的河水里探出头来,大叫道,“现在轮到你了!”
Jim made it look easy, and when his head surfaced in the bubbling water he hollered up, "Now it's your turn!"
OK. The next largest element has to end up in the second last spot. Et cetera. All right, so it's called bubble sort because it does this bubbling up until it gets there.
好的,下一个最大元素又,能跑到倒数第二的位置,等等如此,好的,这称为冒泡排序,因为这个泡泡一直冒到他自己的位置。
应用推荐