Amazon interview question

hash function