"My friends and I have made a list of things we want to do over the summer. Different places to travel, to get away to, maybe a beach a few hours away.
VOA: special.2010.06.18
So in this case, one of the standard ways to do this, is to use what's called a linked list.
标准的处理方法是使用链表,我接下来也准备这么做。
Now this is actually a poor way to do it, because you might say, well, it's just the list.
它以这种形式显示出来了,现在这实际上是一种很差劲的方法,因为你可能会说,好吧。
So, she is interested in how this molecule, gemcitabine, inhibits an enzyme. So, to do those studies, she needs to know a lot of the stuff on this list.
她对这个分子,二氟脱氧胞嘧啶核苷怎么抑制酶很感兴趣,要做这些研究。
Finally, they got Harry Hamlin to do it, who was kind of a B-list sort of guy.
最后他们找了Harry,Hamlin来演,他是一个二线演员。
LS And what very often happens if you do an LS in your account, to list your files, there's a whole lot of stuff in here at the moment -- and I don't have it here - but what you'll often see -- I'll just fake this demo -- is a file called core.
经常发生的是,如果你用你的账号做一个,来列出你的文件,此刻这里有一大堆元素,-它不在这里,但你们将经常看到--我将篡改这个演示-,是一个叫做core的文件。
But what you should be able to do is take a look at a list of answers for what we're saying z effective might be, and determining which ones are possible versus which ones are not possible.
但是你们应该能够做到的,是看一下这个可能的,有效电荷量的答案列表,并且确定哪些是可能的,哪些是不可能的。
And what does that say? It says, let's assume I want to do k searches of a list. OK.
如果我们假定要在列表中做k次搜索,在线性的情况下,假定是一个未排序的情况。
OK? So the example I'm going to do, I'm going to search a sorted list.
来搜索目标元素,好,翻到课堂材料的第二页。
So an easy way to do this would be to say, let's just represent them as a list.
一个简单的方法就是,让我们用数组的形式。
So let me expand on that very slightly, and again we did this last time but I want to do one more time. I have to be careful about how I'm actually implementing a list.
我们之前做过了一次,但还是再做一次吧,我得小心的在列表中执行,例如在这个例子中。
Takes in a list. What does it say to do?
这段代码要做什么?
You try to design actually I'm going to come back to that in a second. It's like you're trying to use a hash function that spread things out pretty evenly. But the places you store into in those lists may have to themselves have a small list in there, and when you go to check something, you may have to do a linear search through the elements in that list.
你尝试着去设计,实际上过会儿我会回头讲解这个问题,类似于你需要用一个哈希函数,非常平均的将物体分发出去,但是在列表中你数据,映射到的地方可能会有自己的一小段列表,当你回头查找数据的时候,你可能需要在那一小段列表中做线性查找。
应用推荐