Professional Documents
Culture Documents
1
17. Find the degree of each node in the following graph.
b
a c
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.
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.
28. a) Discuss the algorithms for Garbage collection and compaction (7)
b) Describe the different types of Buddy system. (5)