You are on page 1of 4

ANNA UNIVERSITY COIMBATORE

MCA DEGREE EXAMINATIONS : JAN / FEB 2009


REGULATIONS : 2007
FIRST SEMESTER
074240010 / CA104 – DATA STRUCTURES
TIME : 3 Hours Max.Marks : 100
PART – A
(20 x 2 = 40 MARKS)
ANSWER ALL QUESTIONS
1. What is Header Linked List? Specify its use.
2. List out the applications of stack.
3. What is deque? How it is represented?
4. Convert the given infix expression into postfix and prefix expression.
(A – B) / ((D + E) ∗ F)
5. Why tree is called a non-linear data structure?
6. Construct an expression tree for the following expression.
E = (a – b) / (( c ∗ d) + e)
7. Differentiate binary tree with binary search tree.
8. Define threaded trees.
9. Specify the conditions of B – trees.
10. List out the rebalancing rotations of AVL Tree.
11. Differentiate sorting and searching with an example.
12. Comment on the worst case time complexity of merge sort.
13. What is a hash function? Give two examples.
14. What is collision in hashing? Give an example.
15. Distinguish between BFS and DFS of a graph.
16. What is topological sorting?

1
17. Find the degree of each node in the following graph.
b

a c

18. Find all the spanning trees of the graph.


a c
b The graph nodes are
to be labelled

d
19. Define fragmentation problem with respect to dynamic storage allocation.
20. What is the significance of buddy systems?
PART – B
(5 x 12 = 60 MARKS)
ANSWER ANY FIVE QUESTIONS

21. Explain in detail about the insertion and deletion operations of a singly linked (12)
list with ADT.

22. a) What is recursion? Explain how it is implemented using stack. (6)


b) Discuss the advantages, if any of a two – way list over a one-way list for each (6)
of the following operations.
(a) Traversing the list to process each node
(b) Deleting a node whose location Loc is given
(c) Searching an unsorted list for a given element ITEM.
(d) Searching a sorted list for a given element ITEM.
(e) Inserting a node before the node with a given location Loc.
(f) Inserting a node after the node with a given location Loc.

2
23. a) Consider the following stack, where STACK is allocated N = 6 memory cells. (4)
STACK : AAA, DDD, EEE, FFF, GGG, _______
Describe the stack as the following operations take place :
(i) PUSH (STACK, KKK) (ii) POP (STACK, ITEM)
(iii) PUSH (STACK, LLL) (iv) PUSH (STACK, SSS)
(v) POP (STACK, ITEM) (vi) PUSH (STACK, TTT)

b) Implement the insertion and deletion operation of a circular queue using (8)
array with the following example
Circular queue is allocated six memory cells :
FRONT : 2 REAR : = 4 QUEUE : __ , A, C, D, __, __
(i) F is added to the queue (ii) Two letters are deleted
(iii) K, L and M are added (iv) two letters are deleted
to the queue

24. a) A binary tree T has 9 nodes. The inorder and preorder traversals of T yield (4)
the following sequences of nodes :
Inorder : E A C K F H D B G
Preorder : F A E K C D H G B
Draw the tree T.

b) Insert the following keys in the order shown to construct an AVL search tree (8)
with a detailed explanation.
A, B, C, D, E, F, G
Delete the last two keys in the order of Last In First Out.

3
25. a) Describe the procedure to find the minimum spanning tree using Prim’s (6)
algorithm.

b) Describe an algorithm to find the shortest path between two points in a (6)
graph.

26. a) Using heap sort, sort the following sequence. (8)


25, 12, 67, 78, 45, 23, 89, 120, 56, 38, 11, 6

b) Write the procedure for quicksort. (4)

27. a) What is NP completeness? Explain it with an example. (5)


b) Explain the concept of hashing and the problems associated with them by an (7)
example.

28. a) Discuss the algorithms for Garbage collection and compaction (7)
b) Describe the different types of Buddy system. (5)

***** THE END *****

You might also like