It should be clear to everyone that we will not repeat the mistakes of the past.
VOA: standard.2009.12.05
I just go down the list selecting the smallest person at a time and then I repeat, repeat, repeat but when we actually did out the math or kind of reason through it, the running time, the asymptotic running time of bub-- of Selection Sort was also what?
只需要遍历列表,每次找出最小的元素,然后重复上述步骤,但从数学角度看,选择排序的时间复杂度,又是多少呢?
And that idea was, we make a guess in the middle, we test it so this is kind of a guess and check, and if the answer was too big, then we knew that we should be looking over here. If it was too small, we knew we should be looking over here, and then we would repeat.
这些有理数是有序排列的,然后我们的想法是,首先在中间取个数作为猜想数,然后对这个猜想数进行验证,如果由猜想数得到的答案太大,我们知道应该跳过,比猜想数大的那个区间,如果太小的话。
应用推荐