InterviewSolution
Saved Bookmarks
| 1. |
From the following given tree, what is the computed codeword for ‘c’?(a) 111(b) 101(c) 110(d) 011I got this question in an interview for job.This intriguing question comes from Greedy Algorithms in division Greedy Algorithms of Data Structures & Algorithms II |
|
Answer» CORRECT answer is (c) 110 Explanation: By recording the path of the node from root to leaf, ASSIGNING left branch as 0 and RIGHT branch as 1, the codeword for c is 110. |
|