data structures - Chaining Hash Tables - Average number of table entries examined when adding to hash table -


i know in chained hashing, average number of table entries examined in successful search approximately:

1+(load factor/2) 

would same formula number table entries examined when adding elements hash table? i'm thinking be. want make sure i'm not thinking wrong.

yes. "insert" lookup operation additional modification.

however, if hashing scheme involves kind of rebalancing or resizing operation, there may higher amortized operation count inserts lookups.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -