Algorithm for Creation of Binary Tree


Step 1: [check whether the tree is empty]
        IF Node = NULL 
           Node = Create a Node 
        Left_Child [Node] = NULL 
        Right_Child [Node] = NULL
Step 2: [Test for the left child]
        If Info [Node] >= Info
            Left_Child [Node] = Call Create_Tree
            (info, Left_Child [Node])
        Else
            Right_Child [Node] = Call Create_Tree
            (Info, Right_Child [Node])
Step 3: Return (Node) 
Step 4: EXIT