TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 157

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 157', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | all we have to do is to increase the number of active slots by 1 to 10 and rehash the elements in slot 1. It works just like the example above none of the slots 2-7 is affected by the change because the second rule folds all of their hash calculations into their current slots. When we have added a total of 96 elements the number of active slots and the total number of slots will both be 16 so we will be back to a situation similar to the one we were in before we added our first expansion slot. What do we do when we have to add the 97th element We double the total number of slots again and start over as This can go on until the number of slots gets to be too big to fit in the size of integer in which we maintain it or until we run out of memory whichever comes first. Of course if we want to handle a lot of data we will probably run out of memory before we run out of slot numbers. Since the ability to retrieve any record in any size table in constant time on the average would certainly be very valuable when dealing with very large databases I considered that it was worth trying to adapt this algorithm to disk-based hash tables. All that was missing was a way to store the chains of records using a storage method appropriate for disk files. Making a Quantum Leap Upon further consideration I realized that the quantum file access method could be used to store a variable-length storage element pointed to by each hash slot with the rest of the algorithm implemented pretty much as it was in the article. This would make it possible to store a very large number of strings by key and get back any of them with an average of a little more than one disk access without having to know how big the file would be when we created it. This algorithm also has the pleasant effect of making deletions fairly simple to implement with the file storage of deleted elements automatically reclaimed as they are removed. Contrary to my usual practice elsewhere in this book I have not .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.