Second CIA (9 November 2021)
Second CIA (9 November 2021)
Second CIA (9 November 2021)
School of Computing
Second CIA
(9 November 2021)
Course Code: CSE103 Duration: 60 minutes
Course Name: Data Structures Max Marks: 20
Class: II B.Tech CSE
Answer all the questions 2 X 10 = 20 Marks
1.a) Trace the steps in converting the given infix expression into postfix expression using
stack. ( 4 Marks)
1.b) Show the implementation of the Polynomial 5x3 + 7x2 – 4x – 6 using Singly Linked List.
The node structure must include fields for the coefficient and the power of x in addition to the
link field. (2 Marks)
1.c) Show the output of the following algorithm if Q consists of elements 10, 20, 30, 40 and
50 and S consists of elements from Top to Bottom: 5, 15, 25, 35, 45, 55, 65 (4 Marks)
Algorithm sample(Q, S)
903, 425, 1008, 317, 999, 379, 1000, 406, 1003, 398, 1001.
2.b) Show the BST after deleting 1000 and 903 from the result of question 2a.[Hint: Use In-
order Successor for replacement.] ( 2 Marks)
2.c) Convert the following General tree into a Binary tree. ( 2 Marks)
E
D
B C
N O
K L M
F G H I J
2.d) Draw the Binary tree provided the following facts are known about the tree: (3 Marks)