Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Practice Tech Mahindra Essay Topics

Program Discussion :: Trees

Home > Programs > Trees

2 / 17

Write a program to delete the given element in the tree

Answer:

#include 
#include 
 
struct btnode
{
    int value;
    struct btnode *l;
    struct btnode *r;
}*root = NULL, *temp = NULL, *t2, *t1;
 void create();
 void insert();
 void delete();
 int flag = 1;
 void main()
{
 insert();
 delete();
getch();
}
/* To insert a node in the tree */
void insert()
{
    create();
    if (root == NULL) 
        root = temp;
    else    
        search(root);    
}

Asked In ::

Post Your Answer Here:

Language:

Post Your Reply Here: