You are on page 1of 2

CMR INSTITUTE OF MANAGEMENT STUDIES

( AUTONOMOUS )
MODEL QUESTION PAPER
2MCA01 : DATA STRUCTURES
Total Marks: 100 Time :3 Hrs

Answer the following:

1 (a) Define a data structure? Distinguish between linear and non linear
data structure with an example. 8
(b) Discuss briefly about one dimension and multi dimensional arrays
with an example. 6
Write an algorithm to insert an element into one dimensional array. 6

(or)

2 (a) What is algorithm and algorithm complexity ? 4
(b) What is Sparse matrix? How do you represent in memory ? 6
(c) Write an algorithm to add two sparse matrices 10

3 (a)What are the advantages and disadvantages of doubly linked list over singly
linked list ? 6
(b) Write an algorithm to insert and delete element in the linked list. 10
(c) What is header linked list? Give an example 4
(or)
4 (a) What is garbage collection? 4
(b) Write an algorithm to insert and delete element in the Doubly linked list. 10
(c ) Write an algorithm to sort a given linked list. 6

5 (a) Define a stack . Explain linked list representation of stack and discuss
various operations performed . 10
(b) Write an algorithm to convert infix expression to postfix expression. 10

(or)

6 (a)What are the advantages and disadvantages of circular queues over linear queues. 5
(b) What are the applications of linear queues. 5
(b) Write an algorithm to insert and delete an element from linear queue 10

7 (a) Define the following:
i)Binary tree ii)Height of binary tree iii)Expression tree 6
(b)Write a pseudo code for inorder, preorder and postorder traversal of tree. 6
(c )Write an algorithm to insert and delete an element from a binary search tree. 8

(or)

8(a)What is AVL trees? How do you insert an element into an AVL tree with an
example .Give its algorithm 10
(b)What is heap, max heap and min heap? Explain the steps involved in creating
a heap . 10

9(a)Explain DFS and BFS methods with respect to graph. 8
(b)Discuss any two ways of representing graph in memory 6
) Write an algorithm to search an element using Linear search . Trace
with an array of eight elements. 6
(or)
10 (a) Write an algorithm to sort sequence of numbers using Quick sort. Trace
with an array of eight elements. 10
(b) What is Adjacency Matrix? Write Warshalls algorithm for path matrix. 10

You might also like