DS(2nd)May2015
DS(2nd)May2015
of Pages : 02
Total No. of Questions : 09
MCA (2012 & Onwards) (Sem.–2)
DATA STRUCTURES
Subject Code : MCA-203
Paper ID : [B0135]
Time : 3 Hrs. Max. Marks : 100
INSTRUCTION TO CANDIDATES :
1. SECTIONS-A, B, C & D contains T WO questions each carrying T WENT Y marks
2.
m
each and students has to attempt any ONE question from each SECT ION.
o
SECTION-E is COMPULSORY consisting of T EN questions carrying T WENT Y
marks in all.
.r c
pe SECTION-A
m
Ql) a) How to evaluate a postfix expression using stacks? Elaborate with the help of an
example.
a o (10)
r p
list? Give the algorithm.
.r c
b) What is a Two-Way Linked List? How to delete an element from a two-way linked
(10)
b
tradeoff? What is the significance of Big O notation?
p e
Q2) a) Discuss the complexity of an algorithm. What do you understand by time space
(10)
a
b) What is a Pointer? Discuss pointer arithmetic in detail. How array of pointers are
rp
used? (10)
b
SECTION-B
Q3) a) What is a Binary Tree? How binary trees are represented in memory? How to traverse
a binary tree using pre-order traversal using recursion? (10)
b) What is a B-tree? How an element is inserted into a B-tree? Explain with the help of
an example. (10)
Q4) a) How to delete an element from an AVL search tree? Give an example. (10)
b) What is Max Heap? How to delete an element from Max Heap? Write the algorithm.
(10)
1 | M- 26054 (S14)-1118
SECTION-C
Q5) a) What is a Path Matrix? Write and explain Dijkastra’s algorithm to find shortest path
in a graph. (10)
b) How to delete a node from a graph? Write and explain the algorithm with the help of
an example. (10)
Q6) a) How to traverse a graph using Depth First Search (BFS)? Give a non-recursive
algorithm of DFS and give an example. (10)
b) Discuss linked representation of a graph with the help of an example. (06)
c) What is a Complete Graph? How many edges are there in a complete graph with n
m
nodes? Give an example. (04)
o
.r c
SECTION-D
Q7) a) How to resolve collision in hashing? Discuss the method with the help of an example.
(10)
pe
efficiency of the algorithm.
m
b) Write and explain the algorithm to sort an array using merge sort. Discuss the
(10)
a o
.r c
Q8) a) Sort the following elements using radix sort :
r p
329, 153, 361, 435, 567, 124, 381, 543 (10)
b e
b) How to search an element in an array using linear search? Write the algorithm and
discuss best and worst case complexity of linear search algorithm. (10)
SECTION-E
a p
rp
Q9 Write briefly :
a) What is a Sparse Matrix? Give example.
b
b) What do you understand by Garbage Collection?
c) What is a Grounded Header Linked List?
d) What is a Priority Queue? Give an example.
e) Differentiate between Inorder and Postorder traversal of a tree.
f) Give an example of threaded binary tree.
g) Differentiate between simple graphs and multigraphs.
h) Give an example of division method used for hashing.
i) Draw a decision tree for sorting 3 items.
j) Give basic difference between Insertion sort and Selection sort.
2 | M- 26054 (S14)-1118