Friday, February 13, 2009

MCS-021 : DATA AND FILE STRUCTURES,DEC 2005

MCA (Revised)
Term-End Examination
December, 2005

MCS-021 : DATA AND FILE STRUCTURES


Maximum Marks : 100
Time : 3 hours (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 addition of two polynomials in one variable. 10

(b)Define a stack. Explain the operations that can be performed on a stack. How are multiple stacks implemented using arrays ? 10

© Define and give an example of a Minimum Cost Spanning Tree. Write at least two differences between Kruskal's and Prim's Algorithms. 10

(d) Define a heap. Sort the following numbers using Heap Sort 10

2, 3, 81, 64, 4, 25, 36, 16, 9, 49

Clearly write all the steps involved in sorting the numbers

2.(a) Give simplified big-O notation for the following functions : 5

(i) 30 n2 [n square]
(ii) log n+3n

(b) Define dequeue. Write an algorithm for the implementation of a dequeue using arrays. 15

3 (a) Define a tree, and a binary tree. What are the different ways of traversing a binary tree ? Write an algorithm for any one of the traversal methods. 14

(b) Write an algorithm for the implementation of Binary Search. What are its Space and Time complexities ? 6

4. (a) Define an AVL tree. In case an AVL tree becomes unbalanced, how will you balance it ? Explain with example(s). 15

(b) Explain an Indexed Sequential File Organisation. 5

5 (a) Define a Splay tree. Explain the possible splay rotations. 10

(b) Write an algorithm for the implementation of a Singly Linked List 10

No comments:

Post a Comment