0% found this document useful (0 votes)
73 views4 pages

CS 8391 - Data Structures

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

*X10312* Reg. No.

Question Paper Code : X 10312


B.E./B.Tech. Degree ExaminationS, NOVEMBER/DECEMBER 2020
Third/Sixth Semester
Computer Science and Engineering
CS 8391 – Data structures
(Common to Computer and Communication Engineering/Electronics and
Instrumentation Engineering/Instrumentation and Control Engineering/
Information Technology)
(Regulations 2017)
Time : Three Hours Maximum : 100 Marks

Answer all questions

Part – A (10×2=20 Marks)

1. Write down the applications of list.

2. Compare Array ADT and list ADT.

3. Write a program to reverse a string using LIFO ADT.

4. Brief about the generalized version of Queue. And list the operations performed
by it.

5. Illustrate Heap Data Structure.

6. How to resolve dangling threads in binary tree ? Illustrate.

7. Give the adjacency matrix representation of the following graph.

8. Give the procedure for finding articulation point.

9. List the limitations of linear probing.

10. What are the steps involved in performing selection sort ?


X 10312 -2- *X10312*

PART – B (5×13=65 Marks)

11. a) i) Given two sorted Linked lists L1 and L2. Exemplify and write the
functions to compute L1 ∩ L2 and L1 ∪ L2. (10)
ii) State the advantages of Linked list over arrays. Specify any two real
time applications of Linked list. (3)
(OR)

b) i) Write an algorithm to perform following operations in a doubly linked list.


1) Insert a node at the end of the list (4)
2) Delete the last node in the list. (3)
ii) Analyze and write algorithm for Circular Linked list for the following
operations using structure pointer.
1) Insert (2)
2) Delete (2)
3) Display. (2)

12. a) What are circular queues ? Write an algorithm to insert an element and delete
an element from a circular queue. And list the applications of queue. (13)
(OR)
b) i) Write a C program to implement a LIFO list that grows and shrinks
dynamically. (7)
ii) Convert the following Infix expression to Postfix expression.
(4 + 8)* (6 – 5)/((3 – 2)* (2 + 2)) (3)
iii) Find the value of the following postfix expression. Show stack contents-step
by step output.
54 6 + 7 4 – * 9 / 35 15 + + (3)

13. a) i) Write C functions to perform deletion in Binary search tree (Include all
the cases). (5)
ii) Construct a binary search tree for the values 45, 56, 39, 12, 34, 32, 10,
78, 67, 89, 91. Give the pre order and post order traversal of the resultant
binary search tree. (6+2)
(OR)
b) Construct B tree to insert the following key elements with order 5.
2, 14, 12, 4, 22, 8, 16, 26, 20, 10, 38, 18, 36, 48, 6, 24, 28, 40, 42, 32 (13)
*X10312* -3- X 10312

14. a) i) Write a program to find an Euler circuit in a graph. (6)

ii) Find the Euler’s path and Euler’s circuit for the graph given below. (7)

(OR)

b) Consider the following graph, in what order will the nodes be visited using
Breadth first search and Depth first search, and give the routine for same. (13)

15. a) i) Write a function to perform selection sort. Give example. (5)

ii) Give the routine for Insertion sort. Sort the following sequence using
insertion sort 3, 10, 4, 2, 8, 6, 5, 1. (6)

iii) Compare Binary search and Linear search. (2)


(OR)
X 10312 -4- *X10312*

b) Consider a hash table with 9 slots. The hash function is h(k) = k mod 9. The
following keys are inserted in the order 15, 38, 8, 5, 20, 33, 14, 30. Draw the
contents of the hash table when the collisions are resolved by

i) Chaining

ii) Linear Probing

iii) Double hashing. The second hash function h2(x) = 7 – (x mod 7). (13)

PART – C (1×15=15 Marks)

16. a) i) Compare B trees with B+ trees. (5)


ii) Create a B+ tree of order 5 for the following data arriving in sequence :
90, 27, 7, 9, 18, 21, 3, 4, 16, 11, 21, 72. (10)

(OR)

b) Write a routine to implement two stacks using single array. (15)

_______________________

You might also like