Wow, OK, maybe not so wow, but this is now constant. This is constant time access. So I can do searching in constant time which is great.
喔,当然,可能没那么,但是现在是常数级了,这是常数时间的访问。
All right? It's now something that I can search in constant time. And that's what's going to allow me to keep this thing as being log.
在固定的时间内搜索,这样就可以让时间复杂度保持在对数级,好的,考虑过了这些。
That is another way of saying that looking up this thing here is constant.
都是常数级的复杂度,另一种说法就是在这里查找时间是固定的。
If I'm running at nanosecond speed, 1000 n, the size of the problem, whatever it is, is 1000, and I've got a log algorithm, it takes 10 nanoseconds to complete.
如果这个问题的规模,也就是n,是,如果这个问题是对数级的,这将会占据10纳秒的时间,你一眨眼的时间。
Now, it's also the case that this is fundamentally what class this algorithm falls into, it is going to take exponential amount of time.
哪个种类的一个实例,这个问题的时间复杂度是指数级的,也就是当n上升的时候。
应用推荐