Time Left - 15:00 mins

GATE 2022 : Data Structure and Programming Quiz-9

Attempt now to get your rank among 320 students!

Question 1

Consider the following postorder and Inorder traversals of binary tree.
Post order: 1, 2, 5, 4, 7, 6, 3, 9, 11, 10, 8
In order: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Find the total number of nodes that have height greater than the height of node 6. Assume root is at lowest height.

Question 2

The minimum size that an array may require storing in a complete binary tree with ‘n’ nodes is ___________.

Question 3

In a sequential representation of a binary tree in memory, let TREE be an array which is linear in nature. If any Node N occupies the position TREE[K] then its left child is stored in and it is right child is stored in-

Question 4

Assume the level of the root node in a tree is 0. We have a tree with nodes having value as 1,3,7,15,29. Then the maximum value of level number possible is _____.

Question 5

Consider a binary tree constructed with the condition that for each node the difference between number of nodes in left and right subtrees is at most 1. Consider the height of the tree is 9 with the condition that height of a tree with single node is 1, then the minimum number of nodes in a tree is _____.

Question 6

The inorder and preorder traversal of a tree is given as

Inorder:4,2,1,7,5,8,3,6

Preorder:1,2,4,3,5,7,8,6

What is the postorder traversal of the tree?

  • 320 attempts
  • 0 upvotes
  • 4 comments
Jul 30GATE & PSU CS

Posted by:

Harshita AgarwalHarshita AgarwalMember since Jul 2020
Share this quiz   |