i don’t really know how to put this but, aside from it being implemented in primary memory i.e. heap, how can i implement variation 1,2 or 3 or any of the variations into the secondary memory which is where we manipulate files right?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming your secondary memory is something with relatively slow seek times like hard disk drives, typically you want to implement a closed hash scheme based on “buckets” where buckets can be paged into main memory in their full relatively quickly. In this manner you usually don’t have to perform expensive disk seeks for collisions or unstored keys. This isn’t a particularly trivial undertaking and often one will end up using a library such as the classic gdbm or others (also see wikipedia).
Most of the bucket schemes are based on extensible hashing with a special case for trying to store large keys or data that don’t fit nicely into a bucket. CiteSeer is also a good place to look for papers related to extensible hashing. (See the references of the linked paper, for example.)