Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m stuck on my homework questions. These are three questions related to data s

ID: 664626 • Letter: I

Question

I'm stuck on my homework questions. These are three questions related to data structures:

Please answer my question if you know about them, thank you.

1. Huffiman Code Construct the Huffman tree corresponding to word frequencies of owl (4), pig (6), fox (8), rat (14), cat (16), and dog (20), and what are the Huffman codes for those words? (Hint: whole word is considered as a unit in Huffman coding) 2. 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) 3. How many calls of Trickledown must be made to heapify the following array x? Show array x after each of the Trickledown call. 01 2 3 456 78 X[il 15 30 23 31 40 27 751 16

Explanation / Answer

public final class Huffman { private Huffman() {}; private static class HuffmanNode { char ch; int frequency; HuffmanNode left; HuffmanNode right; HuffmanNode(char ch, int frequency, HuffmanNode left, HuffmanNode right) { this.ch = ch; this.frequency = frequency; this.left = left; this.right = right; } }