OK? Because what am I doing? It's called bubble sort because it's literally bubbling along, right?
明白了么?你要知道我在做什么,冒泡排序真的就像冒泡,对么?
Why is this nice? Well this is exactly like this.
就是这样,明白了么?我们可以。
Does that make sense?
明白了么
Everyone understand that?
每个人都明白了么
What's this thing doing? It's walking along the list looking for the smallest thing in the back end of the list, keeping track of where it came from and swapping it with that spot in the list. All right?
这是在做什么?是在遍历列表,找列表后端最小的元素,跟踪它从哪里来的,然后同当前点的元素交换,明白了么?
All right, people with me so far?
好,大家都明白了么?
应用推荐