I've got to do another pass. Huh. Sounds like a linear number of times I've got to do- oh fudge knuckle.
冒到最后去,还得再做冒泡,呵,听起来我要做线性次的时间-,哦,胡说八道。
But it was voice-activated, so like, if you yell, it would like start blowing bubbles.
但是它是可以通过语音控制的。所以说,你一大叫,它就开始冒泡。
God bless. Oh, sorry, that wasn't a sneeze, it was a two? How many swaps do I do in bubble sort? A lot. Right. Potentially a lot because I'm constantly doing that, that says I'm running that inner loop a whole bunch of times.
上帝保佑,哦,抱歉,我没说清楚,这是两个问题,在冒泡排序中要做多少次排序?许多,正确的,可能要做很多次,因为在持续的干,这就意味着它要做很多次内部循环。
And so you have to go back to the drawing board and realize Bubble Sort or whatever it is you're using just isn't enough to snuff, I need to come up with something more clever.
因此,你必须重新开始,而且会意识到冒泡排序,或你正在使用的方法并不理想,我需要提出一种更好的方法。
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.
好的,下一个最大元素又,能跑到倒数第二的位置,等等如此,好的,这称为冒泡排序,因为这个泡泡一直冒到他自己的位置。
- Well-- -- I'm-- maybe-- I'm sorry, maybe-- -- No, no, no, no. I-- I think-- -- That's not a-- I-- I think the Bubble Sort would be the wrong way to go.
笑声】,嗯-,我,很抱歉,可能是-,不,不……,我觉得-,那不是-,我觉得冒泡排序应该不是正确的方法。
All right. Nonetheless, even with this change, what's the order growth for bubble sort?
好的,不管怎么样,尽管这发生了,冒泡排序的增长率是多少呢?
Who said bubble? Why?
谁说的冒泡?为什么呢?
应用推荐