






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This is practice paper of data structure and algorithm. It is very helpful to solve different problems
Typology: Exams
1 / 12
This page cannot be seen from the preview
Don't miss anything!
For evaluators’ use:
Question 1 2 3 4 Total
Points
|height(lef tsubtree(x)) − height(rightsubtree(x))| ≤ 1.
Using { 1 , 2 ,... , 9 } as keys,
(a) draw a binary tree on nine nodes which is neither a BST nor is height balanced.
Solution:
(b) draw a height balanced binary tree on nine nodes which is not a BST.
Solution:
~ ~
~ ~ ~
~ ~
H HH HHH
@
@@