14 14 votes The set $\mathbf{T}$ represents various traversals over binary tree. The set $\mathbf{S}$ represents the order of visiting nodes during a traversal.\[\renewcommand{\arraystretch}{1.3}\begin{array}{|l|l|}\hline\quad\quad\textbf{T} & \quad\quad\quad\textbf{S} \\\hline\text{I: Inorder} & \text{L: left subtree, node, right subtree} \\\text{II: Preorder} & \text{M: node, left subtree, right subtree} \\\text{III: Postorder} & \text{N: left subtree, right subtree, node} \\\hline\end{array}\]Which one of the following is the correct match from $\mathbf{T}$ to $\mathbf{S}$ ?$\mathrm{I}-\mathrm{L}, \mathrm{II}-\mathrm{M}, \mathrm{III}-\mathrm{N}$$\mathrm{I}-\mathrm{M}, \mathrm{II}-\mathrm{L}, \mathrm{III}-\mathrm{N}$$\mathrm{I}-\mathrm{N}, \mathrm{II}-\mathrm{M}, \mathrm{III}-\mathrm{L}$$\mathrm{I}-\mathrm{L}, \mathrm{II}-\mathrm{N}, \mathrm{III}-\mathrm{M}$ Data Structures gatecse-2026-set2 data-structures tree-traversal one-mark + – gatecse 1.6k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Jayvijay Chauhan commented Apr 23 reply Follow flag Refer Page 4https://web.engr.oregonstate.edu/~sinisa/courses/OSU/CS261/lectures/BST.pdf 0 0 replyShare Raj_Dev_Verma commented Jul 18 reply Follow flag very simple and basic question inorder - left root right preorder - root left right postorder - left, right,root 0 0 replyShare Please log in or register to add a comment.
4 4 votes Do this question Just by Defniation of each Inorder = Left Subtre, Root Node, Right subtree.Preorder = Root Node, LeftSubtree, Right Subtree.Postorder = Left Subtree, Right Subtre, Root Node.One thing common in all traversal is that Left Subtre is visted first before Right Subtre.so option A is correct (direct Matching) akash_kumar 9 answered Feb 25 akash_kumar 9 comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote In the context of tree traversing or simply traversal is the process of visiting every node in the tree exactly once in a specific, systematic order. Unlike linear data structures (like arrays or linked lists), which are usually traversed in a single logical way, trees are hierarchical and can be traversed in several different sequences.1. Inorder Traversal (L-N-R)In this method, the left subtree is visited first, followed by the root node, and finally the right subtree.Definition: Left Subtree$\rightarrow$ Root $\rightarrow$ Right subtree2. Preorder Traversal (N-L-R)In this method, the root node is visited first, followed by the left subtree and then the right subtree.Definition: Root $\rightarrow$ left Subtree $\Rightarrow$ right subtree3. Postorder Traversal (L-R-N)In this method, we visit the left subtree first, then the right subtree, and finally the root node.Definition: Left Subtree$\rightarrow$ Right Subtree $\rightarrow$ Root $(I-L),(II-M),(III-N)$ Hira Thakur answered Feb 23 • moved Feb 25 by Misbah Ghaya Hira Thakur comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Inorder:left < node< right preorder : node < left < rightpostorder : left < right < nodecorrect option : A Bhaskar_Pavan answered Apr 20 Bhaskar_Pavan comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes pre order : Root , left sub tree, Right sb tree in order : : left sub tree , Root, Right sub tree post order : Left sub tree, Right sub tree, Root option :A is correct I−L,II−M,III−N simranharis answered Jun 13 simranharis comment Share Follow 0 reply Please log in or register to add a comment.