Consider a hash table of size m=100 and the hash function h(k)=floor (m(kA mod 1)) for $A=\frac{ (\sqrt{5}-1)}{2} = 0.618033$. Compute the location to which the key k=123456 is placed in hash table
Show the worked solution\[\boxed{h(k)=\big\lfloor m\,(kA \bmod 1)\big\rfloor}\]With the given \(A=0.618033\):\[kA=123456\times0.618033=76299.882048,\qquad kA\bmod1=0.882048.\]\[h(k)=\lfloor100\times0.882048\rfloor=\lfloor88.2048\rfloor=88.\]Answer: C
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com