Time Left - 15:00 mins

Binary tree Traversals II Starter Quiz

Attempt now to get your rank among 63 students!

Question 1

Consider the following elements are inserted into an empty AVL tree in the given order.
6, 8, 4, 2, 25, 21, 17, 7, 3 53 .Identify the root element of AVL tree?

Question 2

Insert 50 , 20 , 60 , 10 , 8  into an AVL Tree. Which rotation is performed to make the tree balanced?

Question 3

For building a Binary search tree from a given pre-order traversal with n nodes, the time taken is?

Question 4

Consider the following traversals of binary tree T.
Inorder: A, B, C, D, E, F, G
Postorder: B, A, D, C, G, F, E
What is the height of the tree (assume root is present at height 0)?

Question 5

In which order the following numbers 7,5,1,8,3 and 2, should be inserted into the binary search tree to get in order and preorder traversal sequences as the same?

Question 6

Consider the pre-order traversal of BST
100 , 50 , 10 , 70 , 400 , 500
What would be the corresponding post-order traversal of the same BST?

Question 7

A binary search tree was constructed by inserting following elements in to an initially empty binary tree.
50, 27, 16, 88, 34, 65, 77,52, 93, 4, 12, 29, 44, 92
Preorder and postorder traversals of the resultant binary search tree were stored in arrays A and B respectively. How many elements have same index location in both the arrays? [Assume arrays A and B start from the same index]

  • 63 attempts
  • 1 upvote
  • 1 comment
Jul 14GATE & PSU CS