Bloomberg interview question

Implement hashcode function.