Good Hash Function for Strings

Usually hashes wouldn’t do sums, otherwise stop and pots will have the same hash. and you wouldn’t limit it to the first n characters because otherwise house and houses would have the same hash. Generally hashs take values and multiply it by a prime number (makes it more likely to generate unique hashes) So you … Read more