Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



The correct sequence of constructing Huffman tree is

A. Repeat until root formed
B. Create leaf nodes
C. Build priority queue
D. Combine lowest frequency nodes

Choose the correct answer from the options given below:





Solution

Create leaf nodes (B) for each character with their frequency. Build a priority queue (C) (min-heap) based on frequency. Combine lowest frequency nodes (D) repeatedly to form new internal nodes. Repeat until root formed (A) — the final remaining node is the root of the Huffman tree. Hence, the correct order is B → C → D → A.


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...