how to find out the inorder successor of a node in a tree??
Answer Posted / atul kabra
Suppose we want to fint the inorder successor of N. Then
traverse one time right from N. And then traverse a left
subtree until u will get left pointer null node.
s=n->right;
while(s->left!=NULL)
s=s->left;
printf("\nInoder Successor is %d",s->info);
| Is This Answer Correct ? | 27 Yes | 42 No |
Post New Answer View All Answers
What is a nested loop?
Is it better to use malloc() or calloc()?
What is difference between array and pointer in c?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
When was c language developed?
Do you know the use of 'auto' keyword?
What's the right way to use errno?
In which header file is the null macro defined?
What is a void pointer in c?
What are the application of void data type in c?
What is the advantage of c?
I have a varargs function which accepts a float parameter?
Explain data types & how many data types supported by c?
What is the use of getchar functions?
Do you know the difference between exit() and _exit() function in c?