Binary Search Trees

10 flashcards · Computer Science · by Kalpana Satish

  1. Properties of Binary Search Tree

    All nodes of left subtree are less than the root node All nodes of right subtree are more than the root node Both subtrees of each node are also BSTs

  2. Delete Element 7 from the above BST

    Replace inorder successor of 7

  3. A B Which one is not a Binary search Tree?

    Not a Binary search Tree

  4. Write Inorder, Post order and Pre order Traversal

    PreOrder - 8, 5, 9, 7, 1, 12, 2, 4, 11, 3 InOrder - 9, 5, 1, 7, 2, 12, 8, 4, 3, 11 PostOrder - 9, 1, 2, 12, 7, 5, 3, 11, 4, 8

  5. What is called a Parent node in a tree?

    The node which is predecessor of any node.

  6. Degree of a tree

    The total number of children of a node is called as DEGREE of that Node. The highest degree of a node among all the nodes in a tree is called as 'Degree of Tree'

  7. Height of a tree

    The total number of edges from leaf node to a particular node in the longest path is called as HEIGHT of that Node. Height of the root node is said to be height of the tree.

  8. Depth of a Tree

    The total number of egdes from root node to a particular node is called as DEPTH of that Node. In a tree, the total number of edges from root node to a leaf node in the longest path is said to be Depth of the tree.

  9. What are called internal nodes?

    In a tree data structure, the node which has atleast one child is called as INTERNAL Node.

  10. Depict a Binary Search Tree for the given sequence of numbers: 11, 6, 8, 19, 4, 10, 5, 17, 43, 49, 31