1.

When executing a sequence of Unions, a node of rank r must have at least 2^r descendants.(a) true(b) falseMy question comes from Trees in section Trees of Data Structures & Algorithms II have been asked this question in an interview for job.

Answer»

Correct choice is (a) true

The best explanation: By the INDUCTION hypothesis, each tree has at LEAST 2^r – 1 descendants, giving a total of 2^r and ESTABLISHING the lemma.



Discussion

No Comment Found

Related InterviewSolutions