Quantcast
Viewing all articles
Browse latest Browse all 25

Answer by Magenta for Tweetable hash function challenge

Python 3, 89 bytes, 6534 hash collisions

def H(x):
 v=846811
 for y in x:
  v=(972023*v+330032^ord(y))%2**24
 return v%2**24

All the large magic numbers you see here are fudge constants.


Viewing all articles
Browse latest Browse all 25

Trending Articles