Microsoft interview question

Q: Create a hashing function from scratch.