Merge sort takes this idea of divide and conquer, and it does the following: it says let's divide the list in half.
归并排序以如下的步骤使用了分治思想:,把列表分成两半:,下面就是分治。
The teaching fellows right after the class will put up on the stage sheets of paper that are broken down by parts of the alphabet, so make sure you have your names on the concept sheet because you're getting grades for these, and then just put them up in the relevant part of the alphabet that you see on the stage.
助教们在课堂结束后,会把按字母顺序分好的报告纸,放在讲台上,所以请确保把你们的名字写在观点报告上,因为我们会以此评分,并将成绩与你在讲台上所看到的,以字母排序相应的部分放在一起
I could still do the linear case, which is order n or I could say, look, take the list, let's sort it and then search it. But in that case we said well to sort it was going to take n log n time, assuming I can do that.
我仍然可以做O的线性搜索,或者也可以以这个列表为例,我们先将其进行排序,然后再进行查找,但是在这种情况下,要花费n,log,n的时间去对其进行排序。
应用推荐