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 do you mean by dynamic memory allocation in c? What functions are used?
How can I list all of the predefined identifiers?
Why is c called a mid-level programming language?
what are bit fields in c?
What is wild pointer in c with example?
How can a program be made to print the name of a source file where an error occurs?
What is structure pointer in c?
What is #include cctype?
Why is extern used in c?
What is a ternary operator in c?
Tell me what is null pointer in c?
Explain what’s a signal? Explain what do I use signals for?
What is a null pointer in c?
What is structure data type in c?
I need testPalindrome and removeSpace
#include