1. Binary Trees

a. Draw the result figure of a binary search tree by inserting the abbreviations of states OH, FL, PA, SD, MA, IL, HI, WI, IN, TX, AL, and CA into an empty tree in that input order, the comparison is using alphabetical order.

b. After the figure in a, draw it again by deleting the root node (Hint: keep the properties of binary search tree)

2. Red-black Tree

Draw the final figure in Red-black tree by inserting the abbreviations of states OH, FL, PA, SD, MA, IL, HI, WI, IN, TX, AL, and CA into an empty tree in that input order (the comparison is using alphabetical order). Describe those steps where red-black rules are against and what actions you have applied to make them correct.

3. Huffman Code

Construct the Huffman tree corresponding to character frequencies of O(4), P(6), F(8), R(14), C(16), and D(20), and what are the Huffman codes for those characters?

4. Hash Tables

Given an input in the order of {37, 25, 73, 49, 55, 67, 26, 95} and a hash function h(x)=x (mod 11).

a. Show the result of quadratic open addressing probing algorithm.

b. Show the resulting of open addressing hash table with second hash function h2(x)=5-(x mod 5).

5. Heap

How many calls of TricleDown (the method) must be made to Max-heapify the following array x? Show array x after each of the TricleDown call.

i 0 1 2 3 4 5 6 7 8
X[i] 15 30 23 31 40 27 7 51 1

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.