INHA UNIVERSITY IN TASHKENT
School of Computers and Information Engineering
Fall semester 2020
Assignment # 4
ID _____________
Name ___________
Group ___________
Data Structures (SOC2010)
Submission Deadline: 06 Dec 2020 (20:00 Hr.)
NOTE: [Submissions
not conforming to the given format will not be evaluated
]
1. You are required to take print out of this sheet and solve (handwritten) the questions on sheet. You can also
draw a same format by hand if print-out is not possible.
2. Copying of solution is strictly prohibited. In case it
is found, then zero marks will be awarded.
3. Late submissions are not accepted.
Questions
Q1. Assume an empty binary search tree (BST) perform the following
a. Insert 5, 4, 10, 3, 9, 2, 12, 26, 32, 19, 45, 8 and 3 in the sequence.
b. Delete 19, 4, 32
(Show Insert operation here)
Tree After delete 19
Tree After delete 4
Tree After delete 32
Q2. Postorder traversal of a BST is
2,3,4,9,12,10,5.
And Inorder traversal is 2,3,4,5,9,10,12
a. Construct a Tree
b. Write a Preorder traversal
Show Steps here for tree construction
Answer
Preorder traversal is _________________________