In a binary search tree, if you take any internal (non-leaf) node, why is the next (or previous) in-order traversal node of that node is always an external (leaf) node?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This isn’t necessarily true. Try this tree:
Here, the inorder successor of 2 is 3, which is an internal node, and its inorder predecessor is 1, which is also an internal node.
Hope this helps!