1.

In the Union/Find algorithm, the ranks of the nodes on a path will increase monotonically from?(a) leaf to root(b) root to node(c) root to leaf(d) left subtree to right subtreeQuestion is taken from Trees in section Trees of Data Structures & Algorithms IThis question was addressed to me in my homework.

Answer»

Right choice is (a) leaf to root

To explain: One of the lemmas STATE that, in the Union/Find algorithm, the ranks of the NODES on a path will increase MONOTONICALLY from leaf to root.



Discussion

No Comment Found

Related InterviewSolutions