[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Trees

Home > Programs > Trees

38 / 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: