Category: 09. Binary Trees

  • Spanning Tree

    A subgraph T of a connected graph G is called spanning tree of G if T is a tree and T include all vertices of G. Minimum Spanning Tree: Suppose G is a connected weight graph i.e., each edge of G is assigned a non-negative number called the weight of edge, then any spanning tree…

  • Binary Search Trees

    Binary search trees have the property that the node to the left contains a smaller value than the node pointing to it and the node to the right contains a larger value than the node pointing to it. It is not necessary that a node in a ‘Binary Search Tree’ point to the nodes whose…

  • Traversing Binary Trees

    Traversing means to visit all the nodes of the tree. There are three standard methods to traverse the binary trees. These are as follows: 1. Preorder Traversal: The preorder traversal of a binary tree is a recursive process. The preorder traversal of a tree is 2. Postorder Traversal: The postorder traversal of a binary tree is a…

  • Binary Trees

    If the outdegree of every node is less than or equal to 2, in a directed tree than the tree is called a binary tree. A tree consisting of the nodes (empty tree) is also a binary tree. A binary tree is shown in fig: Basic Terminology: Root: A binary tree has a unique node called…

  • General Trees

    A graph which has no cycle is called an acyclic graph. A tree is an acyclic graph or graph having no cycles. A tree or general trees is defined as a non-empty finite set of elements called vertices or nodes having the property that each node can have minimum degree 1 and maximum degree n.…