And then hash character takes in any string or character, single character, gives me back a number. Notice what I do.
然后哈希接受任何字符串或字母,单个字符,返回给我一个数字,注意我要做什么。
Notice what it says. I'm going to pass in 1 a string, call it s, binds it locally, and it says the following.
然后看接下来的内容,接下来说的是如果这个字符串的长度等于,那么我就成功了。
I would say absolutely. And I would say even I could notice over the past four years I feel and there is a different tenor.
我答案是肯定的,我想说,甚至我都能感受到过去四年里,学校氛围发生的变化。
Well, let's take a look at this high7 variant that also use loops that also uses a loop. So this one is a little cute, I like to think. So notice this.
让我们看下这个仍然使用了循环的版本,这个有点意思,我认为,注意这个。
It means that if I took this cell and isolated and watched it, I'd notice that it had a couple of characteristics.
意思就是如果我取这些细胞,分离并观察,我会发现它有几个特征
There's five electrons So what you'll notice here is that I only filled in 3 electrons.
它有5个电子,你们这里会注意到我只填了3个电子。
Either what is established after the tyranny is an oligarchy, but notice I didn't say an aristocracy.
僭主统治之后要么是,寡头统治,注意下我可没说贵族统治
And right off the bat you notice that I am making a huge assumption here.
在你交卷的时候,你正好注意到我在这里做了一个重要的假设。
Notice, I didn't put the wife and the mother in there.
注意了,我没有把妻子和母亲列在金字塔里。
Good. And I notice-- And I notice there is consistency among people.
好的,我发现-,我发现大家的观点都始终如一。
And I started to notice a pattern during those interviews.
从这些采访中,我发现了一种有趣的模式。
So notice what I did here.
注意下我的表示方法
And the fourth thing to notice is, I've used abstraction. I've said nothing about how I'm going to make square root.
第四件事情就是,我运用了抽象,我对怎么去求平方根没有提及。
And the last piece I want you to see here, and then I'll let you go is, notice now how that encapsulation, that binding things together has really helped me.
我想要的那么干净,最后一点要给大家讲的是,也就是下课前讲的一点,就是请注意这里是怎么封装的,也就是把东西绑定在一起。
And then, when I got- I'm also going to count how many comparisons I do, just so I can see how much work I do here, and then notice what it does.
并能看到算法干了些什么-,然后是如果这个索引,比数组的大小小的话,就意味着还没检索到数组的最后。
Notice in this program I have not checked whether or not the user actually provided input.
就拿这个程序说事吧,我们根本没有检查,用户到底有没有输入。
The key thing to notice is, I now have the ability to create iterations, which extends well I can do.
要注意的关键点是,我们现在已经学会如何去创建迭代了,这大大扩展了我们能做的事情的范围。
So notice the nesting, I can flow my way through how those tests are actually going to take place.
请注意嵌套,我可以跳过,其中不执行一些语句。
Notice one last piece. If I'm going to do that, run through all possible answers, I still want to know, gee, what if there aren't any answers? How do I return that case?
注意最后一段,如果我要这样做,也就是运行所有可能的答案,我还是想知道要是没有结果呢?,在这个例子中应该返回什么呢?
Code is right here. And all it's doing is when I'm getting into the different places I'm simply printing out information about where I am. What I want you to see palindrome is notice what happened here.
代码就在这儿,它的作用是当我运行到不同地方时,就输出我所在方位的信息,我想让你们看的就是注意这儿发生了什么,好了我调用了一个。
I want to show you how easy it is to change the code. But, notice, once I've added this I actually have a problem. This is now an under-constrained problem. I have more unknowns than I have equations.
我加上这个条件后,我马上面临一个问题了,这就是现在是一个非约束性问题了,我的未知数比方程数多,你从代数中可以知道。
Some of which I built: cmp, init, str. And there, notice, are the internal definitions And in fact I should've said, we often call those things fields.
就是给我一个所有东西的列表:,所有的方法,与这个类关联的,有一些是我写的:,还有这里,请注意,是一些内部的定义。
Again, what I want you to see is, notice the characteristic of that.
这里面的特征,也就是迭代产生了两个小一号的问题。
OK? Wow. And notice what I got here.
这个声明我们经常用梯形来围绕。
Notice what happens if I do the following.
好,这是十分合理的事情。
And again, notice what I've done.
再一次看看我们做了什么。
But notice now I'm getting a little fancier.
但请注意现在我变得有点兴趣了。
So notice what I'm going to do.
请注意我要去做的操作。
Down here, I've just got two things to merge, and then I've got things of size two to merge and then things of size four to merge. But notice a trade off. I have n operations if you like down there of size one.
但是n的大小是不同的,是吗?在这里我们只要合并两个元素,然后是合并长度为2的列表,接下来是合并长度为4的列表,但是观察一下之间的权衡关系。
a w Notice that I'm only printing i and a w.
注意我只是打印i和。
应用推荐