GATE | Sudo GATE 2020 Mock III (24 January 2019) | Question 58

Huffman coding is a lossless data compression algorithm. The most frequent character gets the smallest code and the least frequent character gets the largest code.

Which of the following option is false regarding Huffman coding algorithm ?
(A) The time complexity of the Huffman algorithm is O(nlogn). Using a heap to store the weight of each tree, each iteration requires O(logn) time to determine the cheapest weight and insert the new weight. There are O(n) iterations, one for each item.
(B) If the input array is sorted, there exists a linear time algorithm.
(C) A divide-and-conquer approach might have us asking which characters should appear in the left and right subtrees and trying to build the tree from the top down. As with the optimal binary search tree, this will lead to to an exponential time algorithm.
(D) None of these.

Answer: (D)

Explanation: All given statements are correct regarding Huffman Coding algorithm.

Option (D) is true.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.