From 7a7c44ed25fec4615f87d8289102927faccb460e Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 31 Mar 2025 20:05:24 -0400 Subject: [PATCH] deterministic must be there --- lectures/22_hash_tables_I/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lectures/22_hash_tables_I/README.md b/lectures/22_hash_tables_I/README.md index 8b05df6..dba6e0f 100644 --- a/lectures/22_hash_tables_I/README.md +++ b/lectures/22_hash_tables_I/README.md @@ -152,6 +152,7 @@ std::string identify(Node* phonebook[PHONEBOOK_SIZE], int number) { ## 22.9 What makes a Good Hash Function? +- Deterministic – same input always produces the same hash. - Goals: fast O(1) computation and a random, uniform distribution of keys throughout the table, despite the actual distribution of keys that are to be stored. - For example, using: f(k) = abs(k)%N as our hash function satisfies the first requirement, but may not