Вы находитесь на странице: 1из 2

MCA24

USN
M.S. RAMAIAH INSTITUTE OF TECHNOLOGY
(AUTONOMOUS INSTITUTE, AFFILIATED TO VTU)
BANGALORE - 560 054
SUPPLEMENTARY SEMESTER EXAMINATIONS - 2010
Course & Branch Master of Computer Applications Se mester : II
Subject Data Structures Using C Max. Mar ks : 10 0
Subject Code MCA24 Du rati on 3 :ors

Instructions to the Candidates:


1. Answer One Full Question From Each Unit.

UNIT-I
1. a) What do you mean by ADT? Explain with suitable example. (07)
b) What do you mean by recursion? Explain with suitable example. (05)
c) Convert the following Infix expression in to postfix expression using stack (08)
operations.
i) A$B*C-D+E/F/(G+H)
ii) ((A+B) *C-(D-E)) $(F+G)

2. a) Write an ADT for varying length character strings. (05)


b) What type of problem can be solved ,using, recursion? How stack is used for (05)
recursive operation.
c) Write a C program to convert an Infix expression in to Postfix expression. (10)

UNIT-II
3. a) Write a program in C:.to, perform each of the following operations on a list. (08)
Assume that the list is implemented using linked list.
i) Delete every second element from a list.
ii) Return the'sum of the odd nodes in a list.
b) What do, you mean by`' priority queue? Explain the different types of priority (04)
queues:
c) Write'Cfunctions to implement the stack using singly linked list. Implement (08)
the following operations.
i) Push() ii) Pop()

Write' a program using C to implement a queue using singly linked list and (10)
implement the following operations.
i) Insert( ii) Delete(
iii) Display() iv) Search(
b) Write a program to store a polynomial equation of any degree using a doubly (10)
linked list. Write a routine to read the expression and to evaluate the
expression.

UNIT-III
5. a) What is the difference between binary tree and a binary search tree? Write (12)
an algorithm to delete a node from a binary search tree.
b) Write an algorithm to traverse a tree in a breadth-first order. (08)

Page 1 of 2
MCA24
6. a) Write a program in C for inorder, preorder and postorder traversals of tree (12)
using recursion.
b) A binary tree has 12 nodes. The postorder and inorder traversals of the tree (08)
are given below. Draw the trees.
i) Inorder: EICFJBGDKHLA / Postorder: IEJFCGKLHDBA
ii) Preorder: ABDGCEHIF / Inorder: DGBAHEICF

UNIT-IV
7. a) Write an algorithm for AVL tree delete operation. (10)
b) What do you mean by Heap? Explain array implementation of Heap in detail. (10)

8. a) Write an algorithm for inserting and deleting a node from Heap. (10)
b) Write an algorithm to balance an AVL left subtree. (04)
c) Write an algorithm for inserting a node into an AVL tree using recursion (06)

UNIT-V
9. a) Draw the B-tree of order 5 created by inserting the following data arriving in (10)
sequence:
78,21,14,11,97,85,74,63,45,42,57,20,16,19,52,30,21
Show each step with diagram.
b) Write an algorithm to insert a vertex and delete a vertex in graph. (10)

10. a) Explain M-way search tree and its: all properties in detail. (04)
b) Write an algorithm for splitting a B.-tree node. (06)
c) Write an algorithm for depth-first traversal of graph. (10)

***************************

Page 2 of 2

Вам также может понравиться