1.

An optimal code will always be present in a full tree.(a) true(b) falseI had been asked this question at a job interview.The origin of the question is Greedy Algorithms in division Greedy Algorithms of Data Structures & Algorithms II

Answer»

Right choice is (a) true

The BEST explanation: An OPTIMAL TREE will always have the property that all nodes are either leaves or have two children. Otherwise, nodes with ONE child could move up a level.



Discussion

No Comment Found

Related InterviewSolutions