GATE Computer ScienceModerateGATE CSE · NIELIT

A file uses six symbols with frequencies 5, 9, 12, 13, 16 and 45. What is the total number of bits needed to encode the file with an optimal Huffman code?

  1. A. 224
  2. B. 214
  3. C. 234
  4. D. 249

Correct answer: A. 224

The internal-node weights created while merging (14, 25, 30, 55, 100) sum to 224 bits.

More Algorithms questions

Exams that ask this topic