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


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:

  • The initial capacity of the array is 5.
  • 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
  • For linear probing, use ( ) = mod , where is the current capacity of the array.
  • For double hashing, use ( , ) = ( + ∗ ( div )) mod , where is the current capacity of the array, and div indicates the integer division.