Time Left - 15:00 mins
GATE CS 2021 : Data structure and programming quiz 10 (App update required to attempt this test)
Attempt now to get your rank among 951 students!
Question 1
The maximum number of nodes in a Binary Search Tree which have same preorder and inorder is when height of the tree is 16 ________. (Assume root at height 0)
Question 2
What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.
Question 3
The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?
Question 4
Consider the following Binary search tree with the following traversals
Inorder: A, M, N, O, P, Q, R, S, T, X, Z
Preorder: Q, P, A, M, N, O, X, S, R, T, Z
Find the number of elements in the 4th, 5th and 6th level respectively. Assume root is at level 1.
Inorder: A, M, N, O, P, Q, R, S, T, X, Z
Preorder: Q, P, A, M, N, O, X, S, R, T, Z
Find the number of elements in the 4th, 5th and 6th level respectively. Assume root is at level 1.
Question 5
What is sum of the minimum number of nodes in the AVL tree of height 5? (Assume root node is present at height zero).
Question 6
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
- 951 attempts
- 9 upvotes
- 14 comments
Jul 29GATE & PSU CS