The problem is, I want to know if, in fact, I've got something that's not of the form I expect.
问题是,我希望知道如果输入的。
And what we want to do then, is we want to basically come up with, how do we characterize the growth-- God bless you-- of this problem in terms of this Quadra-- sorry, terms of this exponential growth.
现在我们想要做的就是,我们怎么来量化增长率呢?,在这个问题中也,就是框架-对不起是,输入指数的增长。
2 2 I can move 9 down, I can move 12 down, I can move 2 down, God and I can cheat by entering God mode and if I hit God and hit Enter well now the problem set solves itself for me.
我可以将9移下来,移动,而且我也可以输入无敌模式,如果我输入,并回车,然后此问题将会自动开始,解决。
Let's assume that the user typed in a pretty short word we didn't run out of memory or anything crazy so here's the new feature.
假设用户输入,很短的单词,没有出现超出内存之类的问题,这里是新的特点。
In binary search-- ah, there's that wonderful phrase, this is called a version of binary search just like you saw bin-- or bi-section methods, - when we were doing numerical things- in binary search, I need to keep track of the starting point and the ending point of the list I'm looking at.
就是当我们处理数字的时候,所称的二分检索,在二分法搜索中,我需要记录区间的开始点和尾点,初始化的时候就是-,问题输入的开始点和尾点,当我开始做测试的时候,我想要做的就是去取中值点。
I'm going to have it take in as input how many legs I got, how many heads do I have, and I just want to write a little loop.
这就是解决问题的思路,我将要输入我有多少条腿,以及我有多少只头。
So one of the things I didn't say, it's sort of implicit here, is what is the thing I measuring the size of the problem in?
我有一点没有提及,这有点含蓄,这一点就是我怎么,来度量输入问题的大小呢?,一个数组的大小怎么来定义呢?
Not a problem, but now let's actually type in something in all lowercase.
没有问题,现在让我们输入,小写字体。
So the running time of the problem where the input is T of size N as expressed here formulaically, T of N, the running time of an algorithm, given an input of size N. You know what?
因此一个输入为N的问题的运行时间,在这儿的公式表示为,如果输入为N,那么此算法的运行时间,是多少呢?
应用推荐