Question
A mid-square hash squares the key, extracts R digits from the result's middle, and returns the remainder of the middle digits divided by hash table
A mid-square hash squares the key, extracts R digits from the result's middle, and returns the remainder of the middle digits divided by hash table size N.
Using a mid square hash, where bucket = 100, and R = 2, where would the following bucket indexes be? Key = 122 Key = 134 (Key= 122, N = 100, R = 2 122*122 = 14,884 R = 48 OR 88? Which of the following is considered the the middle 2 digits? R mod 100 = ANS?)
(Key = 134, N = 100, R = 2 134*134=17,956 R = 2 = 79 or 95? Which of the following is considered the the middle 2 digits? R mod 100 = ANS)
Is this the correct way to find the mid-square hash bucket? Or am I doing it wrong?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started