For a hash table with five slots, and using chaining to resolve collisions what does the inserted sequence: 35, 2, 18, 6, 3, 10, 8, 5 look like in the hash table for the hash function h(x) = x % 5?

a. [ (35, 10, 5) , (6), (2), (3,8) , () ]
b. [ (5, 10, 35) , (2,6) , (3,8) , () ]
c. [ (3, 5, 6), (10), (35), () ]
d. [ (3), (5,6), (8, 10), (35) ]


a. [ (35, 10, 5) , (6), (2), (3,8) , () ]
The integers mod 5 each map to 0->35,10,5, 1->6, 2->2, 3->3,8, 4->(). The chaining each element is appended to the end at each slot.

Computer Science & Information Technology

You might also like to view...

Which of the following initializer lists would correctly set the elements of array n?

a. int[] n = {1, 2, 3, 4, 5};. b. array n[int] = {1, 2, 3, 4, 5};. c. int n[5] = {1; 2; 3; 4; 5};. d. int n = new int(1, 2, 3, 4, 5);.

Computer Science & Information Technology

How many bits in a kilobyte? Megabyte? Terabyte? (Express as numbers and as powers of 2)

What will be an ideal response?

Computer Science & Information Technology

Because the Clone Stamp and Healing Brush tools share the same cloning options, it's important to know what those options are and what they do. What are the cloning options shared by these tools, and how do they work?

What will be an ideal response?

Computer Science & Information Technology

?What makes one system more complex than another is the number of components, the number of levels, and the degree of interaction among its processes, entities, data stores, and data flows.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology