Which of the given option is NOT a factor in Union by Size?

(A) Maintain sizes (number of nodes) of all trees, and during union
(B) Make smaller tree, the subtree of the larger one
(C) Make the larger tree, the subtree of the smaller one
(D) Implementation: for each root node i, instead of setting parent[i] to -1, set it to -k if tree rooted at i has k nodes

Related Posts 👇

  • Which of the following statement is correct?

    (A) A Threaded Binary Tree is a binary tree in which every node that does not have a left child has a THREAD (in actual sense, a link) to its INORDER successor
    (B) A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its PREOREDR successor
    (C) A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its INORDER successor
    (D) A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its POSTORDER successor

Leave a Reply

Your email address will not be published. Required fields are marked *