MCA IInd semester:MCS-021 (S) : DATA AND FILE STRUCTURES

MCA (Revised)
Term-End Examination

December, 2005

MCS-021 (S) : 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 nearer to ‘C’ language.

1. (a) Write an algorithm for the multiplication of two polynomials in one variable. (10)

(b) Define a Queue. Explain the operations that can be performed on a queue. How is a circular queue implemented using arrays ? (10)

(c) Define a “strongly connected component” of a digraph. Write an algorithm for finding strongly connected components of a graph. (10)

(d) Sort the following numbers using Quick Sort :
5, 10, 2, 16, 18, 3, 19, 41, 8
Clearly write all the steps involved in sorting the numbers. (10)

2. (a) Give simplified big-O notation for the following functions: (5)
(i) 10n3 + 6n2
(ii) 5n log n + 30n

(b) Write an algorithm for the implementation of a stack using linked list. (15)

3. (a) Define a Binary Search Tree. Write the process of insertion of a node into a Binary Search Tree. (10)

(b) What are the properties of a Red-Black Tree ? How do AA-trees differ from Red-Black Trees ? Give an example each of a Red-Black Tree and an AA-tree. (10)

4. (a) Write at least three differences between a Circularly linked list and a Doubly linked list. Write an algorithm for the creation and insertion operations on a Doubly linked list. (10)

(b) Write an algorithm for the implementation of a tree using arrays. (10)

5. (a) Explain Sequential File Organisation. (5)

(b) Write an algorithm for the multiplication of two sparse matrices. (15)

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>