Draw the final figure in red-black tree by inserting the


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).

5. How many calls of TricleDown must be made to heapify the following array x? Show array x after each of the TricleDown call.

i

1

2

3

4

5

6

7

8

9

X[i]

20

15

31

10

67

50

3

49

26

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Draw the final figure in red-black tree by inserting the
Reference No:- TGS01089079

Expected delivery within 24 Hours