Why it is better to choose a table size not only a prime number, but also close to a power of 2 if possible?
this is apparently a result of some research.. where can i read more about why closed to power of 2 is important?
also: another question: whats the complexity (Big O notation) of STL sort in C++?
Hashing in C++?
I believe being close to a power of two could be important in searching. Just a guess.
32 hash keys
compare middle element
16 hash keys
compare middle element
8 hash keys
compare middle element
4 hash keys
compare middle element
2 hash keys
check both remaining hash keys
thank you cards
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment