Question

(true/false) All nodes in the right subtree of a node must be smaller in value than their parent (true/false) Each node in a

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

1) False :-All nodes in the right subtree f the node must be grater then in value then their parents node in BST.

2) True :-It is allow zero one or maximum two child node.

3) True:- In-order traverser of binary search tree give you a sorted data.

4) False:-value of parents node must be less then only its right children.

5) True :-all right nodes in BST is grater then its parent node.

6) False:- it is found at left-most node.

7) False:- if we delete the root node of BST then right node of that tree will be a root node.

8) True :- Because inserting a sorted value only inserted at right -most node (if values is sorted from low to high ) or inserted at left most node (if values are sorted in descending order),which required complexity in o(h).h is Height of tree.

9) False : if BST if tree is balanced then it takes time of O(N/2).

10) False :- Both algorithm is same in nature and takes time of 0(log2N).

Add a comment
Know the answer?
Add Answer to:
(true/false) All nodes in the right subtree of a node must be smaller in value than...
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 Binary Search Tree is a binary tree where nodes are ordered in the following way:...

    A Binary Search Tree is a binary tree where nodes are ordered in the following way: each node contains one key (also known as data) the keys in the left subtree are less than the key in its parent node the keys in the right subtree are greater than the key in its parent node duplicate keys are not allowed Create a Binary Search Tree inserting the following list of numbers in order from left to right. 10,          6,           4,            8,            18,          15,          21 Please type...

  • QUESTION 1 In a tree, a ____ is a node with successor nodes. root child descendent...

    QUESTION 1 In a tree, a ____ is a node with successor nodes. root child descendent parent sibling QUESTION 2 In a tree, the ____ is a measure of the distance from a node to the root. count degree branch height level QUESTION 3 Which of the following is not a characteristic of a binary search tree? Each node has zero, one, or two successors. The preorder traversal processes the node first, then the left subtree, and then the right...

  • 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...

  • Answer the following question(s) concerning implementing recursive functions to perform operations on linked lists of nodes...

    Answer the following question(s) concerning implementing recursive functions to perform operations on linked lists of nodes arranged as binary trees. For these questions, use the following struct definition for the nodes of the tree (we will not templatize the node here, so you do not have to write template functions for these questions, just assume trees of <int> values): struct BinaryTreeNode { int item; BinaryTreeNode* left; BinaryTreeNode* right; }; ---------------------------------------------- Given a node for a Binary Tree and an (integer)...

  • Please help this. Q. When is the right subtree of a binary tree processed before the...

    Please help this. Q. When is the right subtree of a binary tree processed before the left?                 When using an inorder traversal algorithm.                          When using a preorder traversal algorithm.                          When using a postorder traversal algorithm.                        Never. The left always goes before the right in the standard traversal algorithms. Q. In a postorder tree traversal, each node is processed ____ its children.                              instead of                            after                      before                  relative to the ordinal values of Q17. If you have an array of 4,000 sorted...

  • 1. A node that is a descendant of another node is called its a. root b....

    1. A node that is a descendant of another node is called its a. root b. sibling c. parent d. child 2. Any node in a tree that does not have any children is refered to as a a. leaf b. tail c. head d. root 3. A binary search tree is a binary tree with what property? a. An internal node is greater than all of its children b. An internal node is less than all of its children...

  • In a binary tree, the balance ratio of node v, bal(v), is the number of nodes...

    In a binary tree, the balance ratio of node v, bal(v), is the number of nodes in the left subtree of node v divided by the sum of the number of nodes in the right and left subtrees of node v. bal(a leaf node) = ½. A tree T is said to be ε-balanced if, for all nodes v in T, ½ - ε < bal(v) < ½ + ε. Design an efficient recursive algorithm that determines whether a binary...

  • C++, data structure using :binarySearchTree Deleting an element from a binary search tree is far more complicated than i...

    C++, data structure using :binarySearchTree Deleting an element from a binary search tree is far more complicated than inserting an element in a binary search tree. An analysis of binary search tree deletion finds 4 cases: Case 1: The node to be deleted has no left and right subtrees Case 2: The node to be deleted has no left subtree but does have a right subtree. Case 3: The node to be deleted has no right subtee but does have...

  • Which of the following is true for a Binary Tree? Question 7 options: A binary tree...

    Which of the following is true for a Binary Tree? Question 7 options: A binary tree is a tree, since no node has more than 2 children, they are known as the left child and the right child The root node is the node without a parent A leaf node is a node without child nodes All of the above

  • Using the following implementation of Tree class Node   {   public int iData;              // data item (key)   public...

    Using the following implementation of Tree class Node   {   public int iData;              // data item (key)   public double dData;           // data item   public Node leftChild;         // this node's left child   public Node rightChild;        // this node's right child   public void displayNode()      // display ourself      {      System.out.print('{');      System.out.print(iData);      System.out.print(", ");      System.out.print(dData);      System.out.print("} ");      }   }  // end class Node //------------------------------------------------------------------ import java.io.IOException; import java.util.Stack; public class Tree { private Node root; // first node of tree // ------------------------------------------------------------- public Tree() // constructor { root = null; }...

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