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 the purpose of type declarations?
What is the difference between union and structure in c?
Explain b+ tree?
Why is c not oop?
What are the types of arrays in c?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
What is the scope of an external variable in c?
Why do some versions of toupper act strangely if given an upper-case letter?
Is c high or low level?
write a program to copy the string using switch case?
What is the difference between printf and scanf )?
Tell me when would you use a pointer to a function?
What are the application of c?
What is a static function in c?
Write a code to remove duplicates in a string.