We all know that the Python dictionary is made up of key,value. You should have heard that the dictionary is looking for a certain value fast, so why?
This is because the dictionary uses the technique of "hashing". So what exactly is a hash?
{Here is a qualification, we only discuss the use of hashing in the implementation of finding this single function, not as a mechanism for encrypting and guaranteeing file integrity, nn.}
Here in order to explain what the hash is, I'm going to do a very non-forbidding metaphor
We have used 360, in the visit "certain" pages, that will not be reported to remind XXXX. Well, we can guess that there's a form inside of him. All unqualified URLs are recorded on it. Then join the 100 million such domain name, then in most cases is better than many times, then we can mark these URLs we can use the characteristics of the algorithm to distinguish them from different tags. And then we'll put these in the array, so if we want to know if our element is in this set, we'll just count the domain name you've visited, and then look at the tag in the array that doesn't hold the tag. Can. {You might say this is different from not having a hash--go ahead and look at my post on List Ps: Here's an array of Python, which is exactly the case, if .... LOL
So what is the complexity of the hash here---it turned out to be Changshu grade ...
But from the text we know that this is a way of using space to change time. The actual is the space consumption brought the disadvantage, far to conceal its performance advantages, so you understand ...
Talking about the hash