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

MCS 21

1. The document provides instructions for a term-end exam on data and file structures. It includes 4 compulsory questions and 5 optional questions covering topics like merge sort, binary trees, graphs, sorting algorithms, linked lists, and minimum spanning trees. Students are asked to write algorithms and code near C language. 2. Question 1 has 4 parts covering merge sort, traversing a binary tree, Dijkstra's algorithm on a graph, and depth-first search on another graph. 3. The other questions ask about file organizations, differentiating concepts, properties of red-black trees, binary search, selection sort, drawing a binary expression tree, analyzing sorting algorithms, and algorithms for linked lists and minimum spanning trees.

Uploaded by

nikita rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
246 views4 pages

MCS 21

1. The document provides instructions for a term-end exam on data and file structures. It includes 4 compulsory questions and 5 optional questions covering topics like merge sort, binary trees, graphs, sorting algorithms, linked lists, and minimum spanning trees. Students are asked to write algorithms and code near C language. 2. Question 1 has 4 parts covering merge sort, traversing a binary tree, Dijkstra's algorithm on a graph, and depth-first search on another graph. 3. The other questions ask about file organizations, differentiating concepts, properties of red-black trees, binary search, selection sort, drawing a binary expression tree, analyzing sorting algorithms, and algorithms for linked lists and minimum spanning trees.

Uploaded by

nikita rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

No.

of Printed Pages : 4 MCS-021

MCA (Revised) / BCA (Revised)

Term-End Examination

December, 2022

MCS-021 : DATA AND FILE STRUCTURES

Time : 3 hours Maximum Marks : 100


(Weightage : 75%)

Note : Question number 1 is compulsory. Attempt any


three questions from the rest. All algorithms
should be written near to ‘C’ language.

1. (a) Write an algorithm of 2-way Merge Sort.


Also discuss the advantage and
disadvantage of 2-way Merge Sort. Also
calculate its time complexity. 10

(b) Traverse the following Binary tree in


Pre-order and Post-order : 10

MCS-021 1 P.T.O.
(c) Write the steps involved to find the
shortest path from Vertex ‘1’ of the graph
given below by using Dijkstra’s algorithm : 10

(d) Write an algorithm to implement Depth


First Search (DFS) method. Use the DFS
method to traverse the following graph, with
Vertex V1 as the source vertex : 10

2. (a) Write short notes on the following : 10

(i) Sequential File Organization

(ii) Indexed Sequential File Organization

MCS-021 2
1
(b) Differentiate between the following : 42 =10
2
(i) Heap and Tree

(ii) B-Tree and Binary Tree


+
(iii) B-Tree and B -Tree

(iv) Binary Tree and Binary Search Tree

3. (a) What is a Red-Black tree ? Explain its


properties. 5

(b) Write an algorithm of Binary Search. 5

(c) Write Selection Sort algorithm. Sort the


following list using Selection Sort in
descending order : 5

25, 10, 50, 21, 65, 18, 45

(d) Let ‘E’ denote the following algebraic


expression :

[a + (b – c)] * [(d – e) / (f + g – h)]

Draw the Binary tree for ‘E’. 5

4. (a) Compute the time complexity of Bubble


Sort and Quick Sort algorithm. Verify the
statement “Best case for Bubble Sort is
worst case for Quick Sort”. 10
MCS-021 3 P.T.O.
(b) Write algorithm and Pseudo code for the
following : 10

(i) Inserting an element in a doubly linked


list.

(ii) Deleting an element from a


doubly linked list.

5. (a) Write Kruskal’s algorithm. Find the


Minimum Cost Spanning Tree of the graph
given below using Kruskal’s algorithm : 10

(b) What is AVL Tree ? Discuss the


mechanism of the following rotations used
in AVL tree : 10

(i) LL

(ii) LR

(iii) RR

(iv) RL

MCS-021 4

You might also like