883 Question Paper
883 Question Paper
PARUL UNIVERSITY
FACULTY OF ENGINEERING & TECHNOLOGY
B.Tech. Winter 2018-19 Examination
Semester: 3 Date: 28/11/2018
Subject Code: 03105203 Time: 02:00pm to 04:30pm
Subject Name: Data Structures Total Marks: 60
Instructions:
1. All questions are compulsory.
2. Figures to the right indicate full marks.
3. Make suitable assumptions wherever necessary.
4. Start new question on new page.
a) O(n) b) O(nlogn)
c) O(n2 ) d) O(logn)
12. Hashing is a searching process? TRUE/FALSE
13. The number of moves required in the Tower of Hanoi problem for k disks is ___________.
14. FCFS scheduling is an application of queue. TRUE/FALSE
Page 1 of 2
15. What is data structure?
Q.2 Answer the following questions. (Attempt any three) (15)
A) What is the problem in simple queue? Explain circular queue with an example.
B) Write an algorithm or a function to search a node in singly link list.
C) Write the algorithm for push and pop operations in stack.
D) Write a procedure for Bubble sort. Sort the following elements using Bubble sort.
31, 22, 11, 4, 55, 56, 3, 11
Q.3 A) Transform the following expression to postfix and evaluate postfix expression by assuming (07)
A=1,B=2,C=3,D=4,E=6,F=6,G=1,I=3 and J=3
A +B-C*D/E +F*G/(I+J)
B) Write an algorithm to perform each of the following operations on circular link List using header (08)
node.
1) add node at beginning
2) add node at the end
3) delete a node which contain element x
OR
B) The post-order and Inorder traversal of binary search tree is: (08)
post-order: 5, 10, 35, 30, 40, 25, 55, 65, 70, 60, 50.
Inorder: 5,10,25,30,35,40,50,55,60,65,70.
Construct a binary search tree and find the pre-order traversal of the BST.
Q.4 (a) A) Define Directed graph, spanning tree and minimum spanning tree. Find minimum spanning (07)
tree for the graph using kruskal’s algorithm.
OR
A) What is a drawback of BST? How we can overcome that? Construct the AVL search tree by (07)
inserting the following elements in the order of their occurrence: 64, 1, 44, 26, 13, 110, 98, 85
B) What is hashing? Explain all open addressing collision resolution methods with suitable example. (08)
Page 2 of 2