Question

QUESTION 9

  1. Consider the following binary search tree:

    50 15 62 20 58) 91 37 60 24

    If the root node, 50, is deleted, which node will become the new root?  

    A

    15

    B

    24

    C

    37

    D

    62

  

QUESTION 10

  1. In the following trees EXCEPT______, the left and right subtrees of any node have heights that differ by at most 1.

    A

    complete trees

    B

    perfect full trees

    C

    balanced binary trees

    D

    binary search trees

  

QUESTION 11

  1. A perfect full binary tree whose height is 5 has ______ nodes. (Note: the height of a tree is the number of the levels in the tree.)

    A

    5

    B

    15

    C

    31

    D

    32

  

QUESTION 12

  1. A complete binary tree with 20 nodes has a height of ________. (Note: the height of a tree is the number of the levels in the tree.)

    A

    3

    B

    4

    C

    5

    D

    6

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(9) If the root node, 50, is deleted, which node will become the new root:

Answer: (c) 37

Description:

Find the immediate successor or predecessor in the tree and replace that node with deleting node. Here, immediate predecessor that is maximum of left subtree is 37.

(10) In the following trees EXCEPT______, the left and right subtrees of any node have heights that differ by at most 1:

Answer: (d) binary search trees

Description:

In binary search tree, the left and right subtrees of any node have heights that differ by more than 1 value.

(11) A perfect full binary tree whose height is 5 has ______ nodes. (Note: the height of a tree is the number of the levels in the tree.):

Answer: (c) 31

Description:

A Perfect Binary Tree whose height is h has total 2h - 1 node. For h = 5, nodes are 2h - 1 = 25 - 1 = 32 - 1= 31.

(12) A complete binary tree with 20 nodes has a height of ____(Note: the height of a tree is the number of the levels in the tree.):

Answer: (b) 4

Description:

A complete binary is a binary tree whose all levels are completely filled up except the last level. So, From level 0, 1, 2, 3 and up to 4 has 20 nodes.

Add a comment
Know the answer?
Add Answer to:
QUESTION 9 Consider the following binary search tree: If the root node, 50, is deleted, which node will become the new root?   A 15 B 24 C 37 D 62    QUESTION 10 In the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A balanced binary tree is a binary tree structure in which the left and right subtrees of every node differ

    Data structures C++1- A balanced binary tree is a binary tree structure in which the left and right subtrees of every node differ in height by no more than 1 Out of the following choices, which is the minimum set of nodes, if removed, will make the BST balanced?2- Which of the following is true for Red-Black Trees ? Select all choices that apply! Select one or more: a. For each node in the tree, all paths from that node to any leaf nodes contain...

  • C++ Binary Search Trees C++ PART B Now We Insert node 20. Is the tree balanced?...

    C++ Binary Search Trees C++ PART B Now We Insert node 20. Is the tree balanced? If not, what is the point of Imbalance and BF of that node? Consider the BST in the previous question, but before the insert of node 31. Here it is again: Sa 25 What is the BF of node 50? Is the tree balanced? If not, what is the point of imbalance, and the BF of that node?

  • Java eclipse question. Given a binary search tree -------------M ---------G ---------N ------D----- H ---B----F How woul...

    Java eclipse question. Given a binary search tree -------------M ---------G ---------N ------D----- H ---B----F How would you find the farthest from the root and most right side of the node? So, in this case, farthest nodes are B and F with height of 4 But the most right side of the node is F Therefore answer is F. I have //Will call helper method. public T findRightmostLowest(){ int lv = height();//This is the maxium height of the tree(4 in this...

  • Coding Language: C++ Function Header: vector<vector<int>> printFromButtom(TreeNode* root) {} Definition for a binary tree node: struct...

    Coding Language: C++ Function Header: vector<vector<int>> printFromButtom(TreeNode* root) {} Definition for a binary tree node: struct TreeNode { int val; TreeNode *left; TreeNode *right; }; The Problem Complete the printFromButtom function that accepts a BST TreeNode and returns the nodes' value from left to right, level by level from leaf to root. This function will return vector<vector int which similar to a 2-D array. Function std: reverse (myvector.begin myVector en might be helpful. Definition for a binary tree node: struct...

  • I need question 9-10 answered. Thank you Question 1 iShow the resulting binary search tree if...

    I need question 9-10 answered. Thank you Question 1 iShow the resulting binary search tree if we are to insert following elements into the tree in given order, [34, 12, 23, 27,31,9,11,45, 20, 37. i) Show the resulting balanced binary search tree if we are to insert following sorted elements into the tree, [9,12,21, 23, 29, 31, 34, 45, 48, 52, 55] iii What is the pre-order traversal of the balanced binary search tree? v) What is the post-order traversal...

  • 8:08 33. Examine the following binary search tree and answer the question. The numbers on the...

    8:08 33. Examine the following binary search tree and answer the question. The numbers on the circles labels so that we can talk about the nodes, they are NOT values in the key members of the binary tree. (a). If an item is to be inserted into the tree whose key data member is less than the key data member in node 1 but greater than the key data member in node 5, where would it be inserted? (b) If...

  • C++ Binary Search Tree question. I heed help with the level 2 question please, as level...

    C++ Binary Search Tree question. I heed help with the level 2 question please, as level 1 is already completed. I will rate the answer a 100% thumbs up. I really appreciate the help!. Thank you! searching.cpp #include <getopt.h> #include <iostream> #include <sstream> #include <stdlib.h> #include <unistd.h> using namespace std; // global variable for tree operations // use to control tree maintenance operations enum Mode { simple, randomised, avl } mode; // tree type // returns size of tree //...

  • C++ Binary Search Tree question. I heed help with the level 2 question please, as level...

    C++ Binary Search Tree question. I heed help with the level 2 question please, as level 1 is already completed. I will rate the answer a 100% thumbs up. I really appreciate the help!. Thank you! searching.cpp #include <getopt.h> #include <iostream> #include <sstream> #include <stdlib.h> #include <unistd.h> using namespace std; // global variable for tree operations // use to control tree maintenance operations enum Mode { simple, randomised, avl } mode; // tree type // returns size of tree //...

  • Consider the following BST: 50 30 70 20 40 60 80 15 35 65 36 64...

    Consider the following BST: 50 30 70 20 40 60 80 15 35 65 36 64 66 QUESTION 32 child of node Referring to the tree above, the value 62 would be inserted as the (left or right) left or right: node: QUESTION 33 Referring to the original tree above (the exact tree in the picture), which nodes are the predecessor and successor of 50 if 50 was deleted. predecessor: successor: QUESTION 34 Referring to the original tree above (the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT