Time Left - 15:00 mins

GATE CS 2021 : Data Structure and Programming Quiz 9

Attempt now to get your rank among 791 students!

Question 1

A binary search tree contains the values 11, 22, 33, 44, 55, 66, 77 and 88. Which of the following is a valid preorder traversal?

Question 2

Consider the following rooted tree with the vertex labeled P as the root:

The order in which the nodes are visited during an in-order traversal of the tree is

Question 3

Consider the following Graph :

Which of the following is not the correct Breadth first traversal of the given graph?

Question 4

Apply BFS and DFS on the graph below and find how many nodes are at same position start from node A.

Question 5

Which of the following is valid BFS of the above graph?

I. ABDCFE

II. ADBCFE

III. ABCFED

Question 6

Consider the Pre-order traversal of a Binary Search Tree :
100, 80, 50, 40, 45, 60, 70, 90, 110, 120
Construct the BST from the given data and find the post-order traversal.
  • 791 attempts
  • 4 upvotes
  • 29 comments
Jul 28GATE & PSU CS