Huffman Coding
  • 1. Who introduced Huffman Coding?
A) John Smith
B) Alice Jones
C) Robert Johnson
D) David A. Huffman
  • 2. Which type of encoding does Huffman Coding use?
A) ASCII encoding
B) Binary encoding
C) Fixed-length encoding
D) Variable-length encoding
  • 3. In Huffman Coding, what type of symbols have shorter codes?
A) Frequent symbols
B) Symbols starting with A
C) Symbols at odd indices
D) Rare symbols
  • 4. What is a prefix code in Huffman Coding?
A) A code that uses only 0s and 1s
B) A code with equal-length codewords
C) A code where no codeword is a prefix of another
D) A code that starts with the same symbol
  • 5. What is a Huffman tree also known as?
A) Perfect tree
B) Complete tree
C) Balanced tree
D) Optimal binary tree
  • 6. How is the efficiency of Huffman Coding usually measured?
A) Encoding speed
B) Memory consumption
C) Compression ratio
D) Number of symbols
  • 7. What's the worst-case time complexity of building a Huffman tree?
A) O(n log n)
B) O(n)
C) O(log n)
D) O(n2)
  • 8. Which step comes after building the Huffman tree in the encoding process?
A) Building a linked list
B) Compressing the data
C) Assigning binary codes to symbols
D) Calculating symbol frequencies
  • 9. In Huffman Coding, what symbol is typically assigned the shortest code?
A) Symbol with the longest name
B) Symbol with a prime number
C) Least frequent symbol
D) Most frequent symbol
  • 10. Which data structure is commonly used to implement a priority queue in Huffman Coding?
A) Queue
B) Stack
C) Linked list
D) Binary heap
  • 11. What kind of codes does Huffman Coding produce?
A) Suffix codes
B) Prefix codes
C) Postfix codes
D) Infix codes
Created with That Quiz — the math test generation site with resources for other subject areas.