Question

h Quiz5 xQuiz 5 - Google DocsNew Tab ? C D njit2.mrooms.net/mod/quiz/review.php?attempt-1059409 Nur-NJIT Moodle John Amaya IST SERVICE DESK FACULTY HELP PAGE STUDENT HELP 2018 Spring - CS 116004 Question 7 The in-order successor of node A is?(Please use the capital words) Participants Mark 0.00 out of 1.00 Badges Flag Competencies Grades General January 15-January 21 January 22- January 28 January 29 - February 4 February 5- February February 12-February 18 February 19 - February 25 Answer B February 26 - March 4 10:21 AM Type here to search l 3/23/2018

So the in order successor is H but why?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The inorder successor means the element which is just greater than the root(the node whose inorder successor we want to find)

Here the inorder successor of A will be H as if the tree follows binary tree property then the right subtree will have all the elements greater than it and left subtree has all the elements smaller than it (assuming distinct values) hence we have to find a value just greater than A which will lie in right subtree but we have to make sure it is minimum in the right subtree to make it just greater than A hence it will be the leftmost value in the right subtree of that node.

Do give a thumbs up and in case there are doubts leave a comment.

Add a comment
Know the answer?
Add Answer to:
So the in order successor is H but why? h Quiz5 xQuiz 5 - Google DocsNew...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT