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.
喔,当然,可能没那么,但是现在是常数级了,这是常数时间的访问。
We have seen log, linear, quadratic, and exponential.
平方级的和指数级复杂度的方法,再说一遍,可能会有些常量。
You have to jump through hoops just to ask the user for a piece of input which should be really the thing a language prioritizes.
你要百依百顺才能从用户那里得到一个输入,这个输入可能只是一个,语言优先级。
I don't really care what key he's in 'cause I don't have absolute pitch, but I can find well, maybe it's a I,VI,IV,V,I chord progression or a I, I IV V I V,I progression or I,IV,V,I.
我也不需要知道他所用的调号,因为我不知道确切的音高,但是我能听出其中的和声,可能是一个,I,VI,IV,V,I级的和声进行,或者,是一个I,V,I的进行,或者。
Now downside of this, well, I've just now violated my preference for having main up top, maybe that's forgivable.
现在在后面,我违反了把main函数放在上面的优先级,可能那是可以宽恕的。
It is certainly possible, for example, that a quadratic algorithm could run faster than a linear algorithm. It depends on what the input is, it depends on, you know, what the particular cases are. So it is not the case that, on every input, a linear algorithm is always going to be better than a quadratic algorithm.
一个二次平方级复杂度的算法,当然也是可能跑的比线性复杂度算法快的,这取决于,你知道的,输入以及特定的案例,因此并不是对于每个输入,线性复杂度就一定会,比二次平方级复杂度的算法的表现要好,只是通常来说是这样的。
You might want to say in the real world, if you go to a movie theater for this R-rated movie, "Are you 18 and over or are you with a parent?"
在现实世界中,你可能想说,如果你去电影院看R级电影,“你有18岁吗?,或者你跟随你的父母亲来的吗?“
应用推荐