• It at least does corroborate the claim that merge sort N*log N as we argue intuitively is in fact, N log N in running time.

    但这至少证实了归并排序,的时间复杂度为。

    哈佛公开课 - 计算机科学课程节选

  • N log N is not nearly as good as log N. As a sanity check, what algorithm have we seen that runs in log N time?

    N,log,N和log,N并不一样,我们之前探讨过的哪个算法其时间复杂度是log,N呢?

    哈佛公开课 - 计算机科学课程节选

  • to the n, every value in the 1 bit vector we looked at last time is either 0 or 1. So it's a binary n number of n bits, 2 to the n.

    从2到n,我们上次看到的,位向量的每个值不是0就是,所以它是n,比特的二进制数,从2到。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Like what the heck have we been spending our time for-- our time on with Bubble Sort and with Selection Sort and in fact there's plenty of other N squared sorts that we're not even gonna bother looking at.

    真见鬼,我们竟然在-,冒泡排序和选择排序上花时间,而事实上,还有很多我们根本都不想考虑的,复杂度为N平方的排序方法。

    哈佛公开课 - 计算机科学课程节选

  • So this line or these lines of code up here are arguably constant time steps to say if N is less than 2 in return, that it will always take maybe one step, maybe two steps, some number of fixed CPU cycles.

    如果N小于2并返回,那么这些行所对应的代码,通常只需要执行一步,或者两步,具体数字与CPU周期有关。

    哈佛公开课 - 计算机科学课程节选

  • 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的时间去对其进行排序。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • On the other hand, if I want to sort it first, OK, if I want to do sort and search, I want to sort it, it's going to take n log n time to sort it, and having done that, then I can search it in log n time.

    我先排序,好的,如果我想排序再搜索,我要排序,这需要花n,log,n时间排序,然后做完了,我们能花log,n时间搜索,啊,哪一种更好呢?恩,呵呵。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Once I have it sorted I can search it in log n time, but that's still isn't as good as just doing n. And this led to this idea of amortization, which is I need to not only factor in the cost, but how am I going to use it?

    一旦对其完成排序,就可以在log,n的时间内对其完成搜索,但是这样做仍然不如n的复杂度,这样做引出了耗时分摊的想法,这时不仅需要考虑耗时的因素?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • If I'm using algorithm that I'm now calling merge sort, T the running time involved in sorting N elements, T of N, you know, is just the same as running the algorithm for the right half, plus what's this plus N come from?

    如果我用归并排序算法,对N个元素其运行时间,就等于此算法一半元素的运行时间,另一半的运行时间,再加上N,这个N是什么呢?

    哈佛公开课 - 计算机科学课程节选

  • And then one of the things that I suggested was that if we could figure out some way to order it, and in particular, if we could order it in n log n time, and we still haven't done that, but if we could do that, then we said the complexity changed a little bit.

    这就涉及到了排序,如果可以想出一种来将其进行排序,甚至可以在n,log,n的时间内完成,虽然目前我们没做这件事,但是一旦开始做这件事,那么复杂性就是发生一些变化。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定