[SOLVED] CE3345 Assignment5-Solved 

34.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (3 votes)
  1. [20 Points] Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x mod 10, show the resulting:
    1. Separate Chaining hash table
    2. Hash Table using linear probing
    3. Hash table using quadratic probing
    4. Hash table with second hash function h2(x) = 7 – ( x mod 7)

 

  1. [10 Points] A min-max heap is a data Structure that supports both deleteMin and deleteMax in O(logN) per operation. The structure is identical to a binary heap, but the heap-order property is that for any node, X, at even depth, the element stored at X is smaller than the parent but larger than the grandparent ( where this makes sense), and for any node X at odd depth, the element stored at X is larger than the parent but smaller than grandparent. See Fig.
  2. How do we find the minimum and maximum element?
  3. Give an algorithm to insert a new node into the min-max heap.
  4. [10 Points] Merge the two binomial queues
  5. [10 Points] Give an algorithm to find all nodes less than some value X, in a binary heap. Your algorithm should run in O(K), where K is number of nodes output.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.