Question
1. Binary Trees (The comparison is based on alphabetical Order). a. Draw the result figure of a binary search tree by inserting the abbreviations of
1. Binary Trees (The comparison is based on alphabetical Order). a. Draw the result figure of a binary search tree by inserting the abbreviations of states NY, IL, GA, RI, MA, PA, DE, IN, VT, TX, OH, and WY into an empty tree in that 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 NY, IL, GA, RI, MA, PA, DE, IN, VT, TX, OH, and WY into an empty tree in that order. Describe those steps where red-black rules are violated and what actions you have applied to make them correct.
3. Huffman Code
Construct the Huffman tree corresponding to letter frequencies of a(4), b(5), c(7), d(8), e(12), and f(20), and what are the Huffman codes for those letters?
4. Hash Tables
Given an input in the order of {39, 23, 72, 58, 45, 69, 28, 96} 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).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started