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
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Differentiate between #include<...> and #include '...'
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Why we use stdio h in c?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What are loops in c?
Difference between exit() and _exit() function?
what do the 'c' and 'v' in argc and argv stand for?
What is the use of linkage in c language?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Why do some versions of toupper act strangely if given an upper-case letter?
What is extern variable in c with example?
What is the difference between the local variable and global variable in c?
What are the application of void data type in c?