B.C.A ( SCIENCE ) Oct 2022-23-25

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Total No. of Questions : 4] SEAT No.

:
PA-1086 [Total No. of Pages : 3
[5905]-31
S.Y. B.C.A. (Science)
BCA-231 : DATA STRUCTURES
(2019 Pattern) (Semester-III)

Time : 3 Hours] [Max. Marks : 70


Instructions to the candidates:
1) Figures in the right indicate full marks.
2) Draw diagram whenever necessary.

Q1) Attempt the following.


A) Choose the correct options. [5×1=5]
i) ______ case indicate the minimum time required for program ex-
ecution.
a) Best b) Average
c) Worst d) Space
ii) ______ algorithm design technique is used in the quick sort
algorithm.
a) Dynamic Programming b) Backtracking
c) Divide and Conquer d) Greedy method
iii) Stack can be implemented using ____and ______.
a) Array and Binary Tree b) Linked list and Graph
c) Array and Linked list d) Queue and Linked list
iv) Consider the following difinition in C programming language.
struct node
{
int data ;
struct node *next ;
}
typedef struct node NODE ;
NODE *ptr;
______ C code is used to create new node.
a) ptr = (NODE*) molloc (NODE);
b) ptr = (NODE*) molloc (sizeof (NODE*));
c) ptr = (NODE*) molloc (sizeof(NODE));
d) ptr = (NODE) molloc (sizeof (NODE));
P.T.O.
v) ____ type of traversal of Binary search tree outputs the value in
sorted order.
a) Preorder b) Inorder
c) Postorder d) Recursive
B) Answer the following. (any 5) [5×1=5]
i) Why do we need data structures?
ii) What is linear search?
iii) Where can stack data structure be used?
iv) List out operations on linked list.
v) How do you find the height of a node in a tree?

Q2) Answer the following. (Any five) [5×3=15]


a) Write a ‘C’ function to count leaf nodes in a binary tree.
b) Assuming int A[2] [3]={1, 2, 3, 4, 5, 6} is stored in a column major order
with first element of A is at address 1000 and each integer occupying 2
bytes. What would be the address of the element A[1] [2]?
c) Sort the following numbers using Bubble sort method.
108, 3, 97, 65, 71, 23, 57, 93, 100
d) Write a ‘C’ function for Binary search.
e) What is graph? Explain applications of graph.
f) Write a ‘C’ function to insert node at middle into singly linked list.

Q3) Answer the following. (Any five) [5×4=20]


a) Write a ‘C’function to implement following operations on stack.
i) Push
ii) Pop
b) Construct the adjacency matrix and adjacency list for the following graph.

[5905]-31 2
c) Write a ‘C’ function to search elements in Singly linked list.
d) What is Tree? Explain any three types of tree
e) Difference between Tree and Graph.
f) Write a note on Asymptotic notations.
g) What is Queue? Explain types of Queue.

Q4) Answer the following. (Any 5) [5×5=25]


a) Construct BST for the following data.
11, 7, 15, 25, 18, 5, 12, 20
b) Write ‘C’ function for Enqueue and dequeue operation.
c) Explain quick sort algorithm with example.
d) Convert following expressions.
i) Convert Infix to Postfix
1) (A + B)* C + (D – E)/F + G
2) A–B/C * A/K–L
ii) Exaluate postfix expressions.
1) Postfix : 34 * 25* +
2) Postfix : 23 * 45 + *
e) Define Graph traversal. Explain with its techniques.
f) What is linked list? Explain representation of linked list in memory.
g) Explain Algorithm analysis in detail with example.



[5905]-31 3

You might also like