Mca 2 Sem Data Structures Analysis of Algorithms Kca205 2023
Mca 2 Sem Data Structures Analysis of Algorithms Kca205 2023
MCA
(SEM II) THEORY EXAMINATION 2022-23
DATA STRUCTURES& ANALYSIS OF ALGORITHMS
SECTION A
Find Q(4,7).
(d) Consider the following linear queue capable of accommodating maximum five
90
2
13
elements. Front = 2 Rear = 4 Queue _ L, M, N, _
_2
Compute following operations
2.
P2
24
(e) What do you mean by non-comparison sort? List two non-comparison sort algorithms.
3E
5.
(f) Apply selection sort algorithm on given data to sort in ascending order:-
.5
5,8,6,2,1,3
P2
(g) Discuss the concept of inorder "successor" and inorder “predecessor” in Binary Search
17
Q
Tree.
|1
(h) Give static and dynamic memory representation of binary tree
(i) How dynamic programming approach is better from recursive programming approach
1
:4
(j) What is the role of a negative cycle, while you are computing the shortest path in the
graph
: 00
09
SECTION B
3
(a) Discuss how two-dimensional array can be stored in the memory and compute the
-2
following. An array Arr[50][100] is stored in the memory along the row major with
each element occupying 4 bytes of memory. Estimate the address of the location
08
(b) Write down algorithm to evaluate postfix expression and also evaluate given postfix
expression using the algorithm
|0
10, 7 + 30, 6 / ∗ 8 −
(c) Discuss various methods to represent graph in the memory, Also write down algorithm
to do DFS in the graph. Apply that algorithm on given graph to compute DFS Tree
SECTION C 90
2
13
3. Attempt any one part of the following: 10x1=10
_2
2.
(a) How to represent followings linked lists in memory provide their self-referential
P2
24
structure and proper diagram
3E
5.
(i) Single linear Linked List
.5
(ii) Doubly linear Linked list
P2
(b) Write a ‘C’ program to implement two stacks in a single array. One stack will grow
-2
from one end of the array and second stack will grow from the other end of the array.
User need to implement following functions
08
(b) Demonstratethe
the traversal of the following tree in Pre-Order,
Pre Post-Order
Order and In-Order.
In Also
write recursive algorithms of three traversals.
2
13
Also apply it on following graph
_2
2.
P2
24
3E
5.
.5
P2
17
Q
|1
1
:4
00
(b) Discuss the applications of longest common subsequence( LCS). Determine the LCS of
:
09