How do you use the f4 key on a laptop?
637
What is a test tube?
904
What is the function of mapreduce partitioner?
695
What is xml simple definition?
949
What is 'CASA' related to bank?
1202
#include
#include
#include
#include
void insert(struct btreenode **, int);
void inorder(struct btreenode *);
struct btreenode
{
struct btreenode *leftchild;
struct btreenode *rightchild;
int data;
};
main()
{
struct btreenode *bt;
bt=(struct btreenode *)NULL;
int req,i=1,num;
clrscr();
printf("Enter number of nodes");
scanf("%d",&req);
while(i<=req)
{
printf("Enter element");
scanf("%d",&num);
insert(&bt,num);
i++;
}
inorder(bt);
}
void insert(struct btreenode **sr, int num)
{
if(*sr==NULL)
{
*sr=(struct btreenode *)malloc (sizeof(struct btreenode));
(*sr)->leftchild=(struct btreenode *)NULL;
(*sr)->rightchild=(struct btreenode *)NULL;
(*sr)->data=num;
return;
}
else
{
if(num < (*sr)->data)
insert(&(*sr)->leftchild,num);
else
insert(&(*sr)->rightchild,num);
}
return;
}
void inorder(struct btreenode *sr)
{
if(sr!=(struct btreenode *)NULL)
{
inorder(sr->leftchild);
printf("\n %d",sr->data);
inorder(sr->rightchild);
}
else
return;
}
please Modify the given program and add two methods for post
order and pre order traversals.
3830
Difference between stack and queue?
1139
What is the unified memory architecture? Explain.
1149
Write about the local class and mention its use?
1136
Explain what are the characteristics that distinguish direct marketing? : insurance cold calling
598
What proportion will you adopt while making allotments to advertisements and promotions from the total budget for marketing?
1158
how to check the paths?
960
What do you understand by reactor pattern in node.js?
526
Is system restore safe?
965
You want to create and maintain user master record. What authorization would you need?
1248