So if you think about the way something like, say, Mapquest works, and last week in recitation you looked at the fact that shortest path is exponential.
所以如果你想想电子地图,还有上周学的列举法,你就会发现一般最简单的方法,都是指数递增的。
So I haven't done magic, I've given you a really fast way to solve a knapsack problem, but it's still exponential deep down in its heart, in something.
所以我并没有施魔法,我已经告诉了你,一种快速解决背包问题的方法了,但是某些方面它的核心仍然是指数增长的。
One is the Mediterranean Diet, another would be the glycemic index diet, and there are yet others.
地中海式饮食法是其中之一,血糖指数法也可以,以及很多其它方法
And it's just gathering together the multiplications while counting down the exponent. And you can see it when we get down to the end test here, we're going to pop out of there and we're going to return the answer.
这个方法就是通过乘法,来一个一个的减小指数,可以看到,最后面的结果测试,我们会在这里退出,然后返回答案。
We have seen log, linear, quadratic, and exponential.
平方级的和指数级复杂度的方法,再说一遍,可能会有些常量。
I'm going to write a function to compute integer power exponents.
我要去写一个,计算一个整数幂指数的方法。
应用推荐