2 Problem
1. Last week we implemented a max heap. Show the changes that are necessary to turn it into a min
heap. Indicate the changes by writing comments on your max heap code.
Note: It is preferable to use your own code. However, a sample code is in the solution folder.
2. Consider the following hashing scheme:
a) The hash table has 26 slots indexed 0 to 25.
b) The hash function takes a string and returns a number between 0 and 25, depending on the
first letter of the string. That is, if the first letter of the string is 'A', it returns 0, if it is 'B' it
returns 1 and so on.
c) To resolve collisions, we use linear probing with an increment of -1. That is, if a slot is taken,
we use the previous one.
We insert the following strings into the table in the given order:
Bach, Dvorak, Beethoven, Debussy, Chopin
Show the contents of the table after each insertion.
3. Solve question 2 if linked lists are used to resolve collisions.
3 Deliverables
1. A PDF file of all the solutions.
2. Code file(s).
1