# YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

## Huffman Code Multiple choice Questions and Answers (MCQs)

Question 11 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

The type of encoding where no character code is the prefix of another character code is called?

optimal encoding | |

prefix encoding | |

frequency encoding | |

trie encoding |

Question 11 Explanation:

Even if the character codes are of different lengths, the encoding where no character code is the prefix of another character code is called prefix encoding.

Question 12 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the running time of the Huffman encoding algorithm?

O(C) | |

O(log C) | |

O(C log C) | |

O( N log C) |

Question 12 Explanation:

If we maintain the trees in a priority queue, ordered by weight, then the running time is given by O(C log C).

Question 13 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the running time of the Huffman algorithm, if its implementation of the priority queue is done using linked lists?

O(C) | |

O(log C) | |

O(C log C) | |

O(C ^{2}) |

Question 13 Explanation:

If the implementation of the priority queue is done using linked lists, the running time of Huffman algorithm is O(C

^{2}). There are 13 questions to complete.