Hashing. What is hashing. Simply, generating a numeric key using an algorithm (hash function) Definition: A function that maps keys to integers, usually to get an even distribution on a smaller set of values. The very simplest hash function is to use the modulus operator %
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Simple hashing algorithm
hash = inputNumber % 100
What’s the effect?
hash = 5381
for i in range(len(key)):
hash = ((hash << 5) + hash) + ord(key[i])