Characters are simple. Suppose you want to represent sets of strings, well you basically just generalize the hash function.
字母是是很简单的,如果你想表示一组字符串,基本上你要做的就是归纳出哈希函数。
Could you tell us about Harrods?
你能给我们说说哈洛德百货公司吗?
If you stop and think of it as a grammatical question, you say to yourself, "Gee, that's a very good question, isn't it, because, of course, the easiest thing in the world is to tell the dancer from the dance.
如果你停下来,把它当成一个语法型问句,你对自己说,“哈,那是个很好的问题,不是吗“,因为,当然,世界上最简单的事,就是将舞者和舞蹈分开。
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.
你尝试着去设计,实际上过会儿我会回头讲解这个问题,类似于你需要用一个哈希函数,非常平均的将物体分发出去,但是在列表中你数据,映射到的地方可能会有自己的一小段列表,当你回头查找数据的时候,你可能需要在那一小段列表中做线性查找。
And he's talking with Mississippi Gene. This is at the bottom of 26: There is something so indubitably reminiscent of Big Slim Hazard in Mississippi Gene's demeanor that I said, "Do you happen to have met a fellow called Big Slim Hazard somewhere?"
他在和密西西比的吉恩讲话,在26页下面:,现在,密西西比的吉恩的行为举止有些地方真切地,让我想起关于细杆的哈查德的往事,我问:“你是否在那里碰巧遇到过一个叫细杆哈查德的人“
Every time you hit the enter key in Notepad or in Microsoft Word, small white lie, those two characters end up getting saved in the file.
在Notepad或Microsoft里,每当你敲回车键时,没有恶意哈,这两个字符,都会保存在文档里。
That in many cases, I can gain efficiency if I'm willing to give up space. Having said that though, there may still be a problem, or there ought to be a problem that may be bugging you slightly, which is how do I guarantee that my hash function takes any input into exactly one spot in the storage space?
普遍存在的增益和权衡,在许多的例子中,可以通过牺牲空间而得到效率方面的增加,话说回来,仍然存在一个问题,或者应该会有一个问题困扰着你,就是我如何保证我的哈希函数能够准确将,任一输入映射到相应的唯一的存贮空间中去?
应用推荐