Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

tree traversal

GATE CSE & IT · Data Structures - Binary Search Tree · 1987-2026

18
PYQs
94%
keyed
1
elite explanations
16
years appeared

Study anchor

Source-book anchor pending for this concept.

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2026 PYQ

The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. $$ \begin{array}{ll}\,\,\,\,\, \text { T } &\,\,\,\,\...

easyanswer keyelite explanation
2025 Q35

Suppose the values 10, -4, 15, 30, 20, 5, 60, 19 are inserted in that order into an initially empty binary search tree. Let T be the resulting binary search tree. The number of edg...

mediumanswer key
2020 PYQ

The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?

easyanswer keybasic explanation
2018 PYQ

The postorder traversal of a binary tree is $$8,9,6,7,4,5,2,3,1.$$ The inorder traversal of the same tree is $$8,6,9,4,7,2,5,1,3.$$ The height of a tree is the length of the longes...

medium
2016 PYQ

Consider the following $$New-order$$ strategy for traversing a binary tree: $$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the root; $$\,\,\,\,\,\,\, \bullet \,\,\,\,\,$$ Visit the ri...

mediumanswer key
2015 PYQ

Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)? I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25 III. 2, 7, 10, 8, 14, 16, 20 IV....

easyanswer key
2013 PYQ

The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?

mediumanswer key
2008 PYQ

A Binary Search Tree (BST) stores values in the range 37 to 573. Consider the following sequence of keys. I. 81, 537, 102, 439, 285, 376, 305 II. 52, 97, 121, 195, 242, 381, 472 II...

easyanswer key
2008 PYQ

The following three are known to be the preorder, inorder and postorder sequences of a binary tree. But it is not known which is which. MBCAFHPYK KAMCBYPFH MABCKYFPH Pick the true...

mediumanswer key
2008 PYQ

You are given the postorder traversal, P, of a binary search tree on the n elements 1, 2,..........., n. You have to determine the unique binary search tree that has P as its posto...

mediumanswer key
2007 PYQ

The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the binary tree is:

easyanswer key
2005 PYQ

A binary search tree contains the numbers 1, 2, 3, 4, 5, 6, 7, 8. When the tree is traversed in pre-order and the values in each node printed out, the sequence of values obtained i...

mediumanswer key
2004 PYQ

Level order traversal of a rooted tree can be done by starting from the root and performing

easyanswer key
2003 PYQ

Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural nu...

easyanswer key
2000 PYQ

Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal. Respectively, of a complete binary tree. Which of the following is a...

mediumanswer key
1997 PYQ

A binary search tree contains the value 1, 2, 3, 4, 5, 6, 7, 8. The tree is traversed in pre-order and the values are printed out. Which of the following sequences is a valid outpu...

mediumanswer key
1996 PYQ

Which of the following sequences denotes the post order traversal sequence of the tree of previous question?

easyanswer key
1987 PYQ

It is possible to construct a binary tree uniquely whose pre-order and post-order traversals are given.

easyanswer key