We'll see later on, there are classes of computation that are inherently much more complex. We hate them, because they're costly, but they're sometimes inherently that way.
我们会稍后详细的讲讲这个,有许多内在更加复杂的种类的算法,我们痛恨它们,因为它们很耗时。
And we said that was log rhythmic, took log n time where n is the size of the list.
当列表的长度为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的复杂度,这样做引出了耗时分摊的想法,这时不仅需要考虑耗时的因素?
应用推荐