Semester : SEMESTER 3
Subject : Data Structures
Year : 2022
Term : JANUARY
Branch : COMPUTER SCIENCE AND ENGINEERING
Scheme : 2015 Full Time
Course Code : CS 205
Page:2
08000CS205122003
PART 0
Answer any two full questions, each carries 9 marks.
12 a) Write an algorithm to convert infix expression to postfix. Trace the algorithm for (6)
the expression
((A+B)*(C—-D)+E)/(F+G)
b) Write an algorithm to dequeue an element which is implemented using linked list. (3)
13 a) Show the result of inorder, preorder and postorder traversal of given tree (3)
(3)
9
(6)
ॐ (9)
7)
b) What is a Binary Search Tree (BST)? Show the creation of the binary search tree (6)
after adding each of the following values in that order: 8, 3, 10, 1, 6, 14, 4, 7, 13.
Show the steps for deleting the value 10 from the above resultant tree.
14 a) Given five memory partitions of 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and (5)
250 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place
processes of sizes 357 KB, 210 KB, 468 KB and 491 KB (in order)?
b) For the given tree 1) compute height of the tree (2)
2) List the siblings for node E
(०९ (8)
ಚ) ಛೈ)
3
c) Explain Full binary tree and complete binary tree with example. (2)
PART E
Answer any four full questions, each carries 10 marks.
15 a) Forthe graph given below Find 1|)adjacency matrix (4)
2)List representation
Page 2 of 3