top of page
Search
  • Writer's picturebigprojectx

Question 6 (20 points): Consider the tuples (44, B), (270, N), (213, C), (61, J), (446, A), (297, O)






Question 6 (20 points): Consider the tuples (44, B), (270, N), (213, C), (61, J), (446, A), (297, O), and (325, C) in such an order. The first value in a tuple is the key, the second value is the respective item. Show their insertion process in a:

      1. Hash table using Linear Probing. 

      2. Hash table using Double Hashing

Keep in mind:

  1. The initial capacity of the array is 5.

  2. Resize the array when ≥ 1 2 . The new capacity is the next prime number after doubling the size of the current array capacity. For example, if the current array capacity is 10, the capacity of the resized array size is 23

  3. For linear probing, use ( ) = mod , where is the current capacity of the array.

  4. For double hashing, use ( , ) = ( + ∗ ( div )) mod , where is the current capacity of the array, and div indicates the integer division.

The post Question 6 (20 points): Consider the tuples (44, B), (270, N), (213, C), (61, J), (446, A), (297, O), and (325, C) in such an order. The first value in a tuple is the key, the second value is the resp – Write My Paper Today appeared first on Professors Essays.

0 views

Recent Posts

See All

Comments


bottom of page