MCA II (Second) Semester Examination 2012-13

Course Code: MCA201 Paper ID: 0872401

Data Structure with ‘C’

Time: 3 Hours Max. Marks: 70 Max Marks: 75

Note: Attempt six questions in all. Q. No. 1 is compulsory.

1. Answer any five of the following (limit your answer in 50 words). (4x5=20)

a) What is Data Structure? List out the areas where data structure are applied extensively.

b) Convert the expression ((a+b)8c-(d-e)^(f+g)) to equivalent prefix and postfix notation.

c) Write difference between stack and queue with example.

d) Define hashing and compare it with indexing.

e) Suppose a linked list consists some numeric values. Design an algorithm to find maximum value of the list.

f) Write the differences between iteration and recursion.

g) Sort in assending order using selection short

56, 57, 92, 38, 44, 90, 61, 75

h) What is Minimum Spanning Tree (MST)? Explain with example.

2. How merge sort works? Explain it with suitable example. On what types of data set the method is suitable; explain in brief.

(10)

3. What is a threaded binary tree? Explain with the help of example. What are its advantages and disadvantages? (10)

4. Write short notes on the following:

a) Doubly linked list (5)

b) Circular linked list (5)

5. What is a Graph? What are its representations? Explain the Adjacency Matrix to represent a directed graph. (10)

6. Write the function / procedure to reverse a linked list so that the last element becomes the first one and second last become the second element and so on. (10)

7. Explain and write the algorithm for tower of hanoi problem using recursion. (10)

8. a) Explain various garbage collection and compacting techniques. (5)

b) Define the queue data structure. Write an algorithm to delete and insert an item from the queue and into the queue. (5)