What Is Wrong With Below Code For Inorder Traversal Of Inorder #697
What is wrong with below code for inorder traversal of inorder threaded binary tree:</p> <pre><code class="language-java"> inordertraversal(threadedtreenode root): threadedtreenode q = inorderpredecessor(root) while(q!=root): q=inorderpredecessor(q) print q.data </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs121 Data Structures and Algorithms. It can also be found in gs gs121 Binary Trees - Threaded Binary Tree - Quiz No.1.
What is wrong with below code for inorder traversal of inorder threaded binary tree:
inordertraversal(threadedtreenode root): threadedtreenode q = inorderpredecessor(root) while(q!=root): q=inorderpredecessor(q) print q.data
inordersuccessor instead of inorderpredecessor must be done
code is correct
it is code for post order
it is code for pre order
Similar question(s) are as followings:
Online Quizzes of gs121 Data Structures and Algorithms
Binary Trees - Binary Search Tree - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Binary Search Tree - Quiz No.2
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Preorder Traversal - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes