From b33e6b0376207a8a9aeb495a011a454ba85dadd9 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 31 Mar 2025 19:45:16 -0400 Subject: [PATCH] move const to before type --- lectures/22_hash_tables_I/README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lectures/22_hash_tables_I/README.md b/lectures/22_hash_tables_I/README.md index 39b595d..ba6610f 100644 --- a/lectures/22_hash_tables_I/README.md +++ b/lectures/22_hash_tables_I/README.md @@ -158,7 +158,7 @@ despite the actual distribution of keys that are to be stored. satisfy the second. - Another example of a dangerous hash function on string keys is to add or multiply the ascii values of each char: ```cpp -unsigned int hash(string const& k, unsigned int N) { +unsigned int hash(const std::string& k, unsigned int N) { unsigned int value = 0; for (unsigned int i=0; i