Search Complexity of a Hashtable within a Hashtable?

Posted by spacker_lechuck on Stack Overflow See other posts from Stack Overflow or by spacker_lechuck
Published on 2012-07-01T15:12:09Z Indexed on 2012/07/01 15:15 UTC
Read the original article Hit count: 426

Say we have a hashtable of size m, and at each bucket we store a hashtable of size p. What would the worst case/average case search complexity be?

I am inclined to say that since computing a hash function is still atomic, the only worst case scenario is if the value is at the end of the linked list in the hashtable of size p, so O(n)?

I have no idea how to calculate the average case for this scenario and would appreciate any pointers!

© Stack Overflow or respective owner

Related posts about hash

Related posts about hashtable