Consider double hashing of the form h(k, i) = (h (k) + ih (k)) mod m 1 2 h (k) = k mod m where 1 h (k) = 1 + (k mod n) 2 n = m − 1 m = 701 where and k = 123456 For , what is the difference between first and second probes in terms of slots?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. 257
Explanation
h₁ = 123456 mod 701 = 80 and h₂ = 1 + (123456 mod 700) = 257. Successive probes differ by h₂ = 257 slots.
More Data Structures and Algorithms questions
- Consider the complexity class as the ¯¯¯ L ∈ NP set of languages L such that , and the following two statements : S : P ⊆ CO − NP 1 S NP ≠…
- Consider the following steps : S 1 : Characterize the structure of an optimal solution S 2 : Compute the value of an optimal solution in bo…
- Consider the following properties with respect to G = (V , E) a flow network in which a flow is a f : V × V → R real-valued function : P :…
- Consider the graph shown below : Use Kruskal's algorithm to find the minimum spanning tree of the graph. The weight of this minimum spannin…
- The solution of recurrence relation : T(n) = 2T(sqrt(n)) + lg(n) is
- The elements 42,25,30,40,22,35,26 are inserted one by one in the given order into a max-heap. The resultant max-heap is stored in an array…