In: Computer Science
Consider the phrase "trick or treat" (note the 2 spaces). Assuming that spaces come before letters in the alphabet (look at the order in the ASCII table), build a Huffman tree based on that phrase.
What are the encodings for each character?
space:
a:
c:
e:
i:
k:
o:
r:
t:
What is space savings achieved by using this encoding to encode "trick or treat" instead of using 16-bit Unicode? Give your answer to the nearest whole percentage: %