Hash function and table. Code: https://github.