DS2018
DS2018
MCA24
Institute of Technology
USN 1 M S
UNIT – I
1. a) Define Abstract Data Type (ADT)? Explain the Model for an ADT. CO1 (05)
b) Design a C routine to convert an infix expression to postfix expression. CO1 (08)
Convert the following expression to postfix expression
i) (A/B)*(D-C) ii) X^Y*Z – M+N+P/Q.
c) Define Recursion. Solve the Tower of Hanoi problem for 3 disks. CO3 (07)
UNIT – II
3. a) Define Queue. Develop an ADT for QUEUE. CO2 (05)
b) Develop an algorithm to perform insert and delete operations on a CO2 (10)
circular single linked List.
c) Design an algorithm to concatenate two Singly Linked List. CO2 (05)
4. a) Differentiate between doubly Linked List and singly Linked List. CO2 (10)
Develop an algorithm to perform stack operation into an ordered
doubly linked List.
b) Design a routine to simulate the operations of Queue using singly CO2 (10)
linked list.
UNIT – III
5. a) Develop C Module to construct a binary search tree. Trace its operation CO4 (10)
on the following set of numbers.
8,15,12,9,10,15,69,6,15,8,5
b) Develop recursive C module for different binary tree traversals. CO4 (10)
Travers the following binary tree in different order.
Page 1 of 2
MCA24
UNIT – IV
7. a) Develop an algorithm to insert nodes to an AVL tree and illustrate with CO4 (10)
an example.
b) Design an algorithm and Show construction of a heap from the CO4 (10)
following data set20, 7,13,8,18,50,65,62,21,91.
Insert 100 into the Heap and reheapify.
8. a) Create an AVL tree using the following data. Show the balance factors CO4 (10)
in the resulting tree
27,84,18,52,20,42,24,14,16,7
Insert 38 and 49 into the tree created.
b) Define Heap? Develop an algorithm for Heap sort. CO4 (10)
UNIT – V
9. a) Design an algorithm for Depth-first traversal of a Graph. CO4 (10)
b) Create a B tree of order 5 for the following data arriving in sequence. CO4 (10)
2,13,9,1,24,7,15,29,18,8,54,18,49,86,4,22,27,52,55,31.
10. a) Explain different graph storage structure with an example. CO5 (10)
b) What is M-way tree? Write an algorithm to insert and delete a node CO5 (10)
from the B-tree.
****************
Page 2 of 2