DR.
BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY, LONERE
Regular/Supplementary Winter Examination – 2024
Course: B. Tech Branch : AIDS/AI(AI & DS)/CSE(AI&DS) Semester :III
Subject Code & Name: BTAIC303 Data Structure and Algorithm using Python
25331344
25331344
25331344
Max Marks: 60 Date:10/02/2025 Duration: 3 Hr.
Instructions to the Students:
1. Each question carries 12 marks.
2. Question No. 1 will be compulsory and include objective-type questions.
3. Candidates are required to attempt any four questions from Question No. 2 to Question No.
6.
4. The level of question/expected answer as per OBE or the Course Outcome (CO) on which the
question is based is mentioned in ( ) in front of the question.
5. Use of non-programmable scientific calculators is allowed.
6. Assume suitable data wherever necessary and mention it clearly.
(Level/CO) Marks
Q. 1 Objective type questions. (Compulsory Question) 12
1 How is a code block indicated in Python? (L1/CO1) 1
25331344
25331344
25331344
a. Brackets b. Indentation c. Key d. None
2 What will be the output of the following code ? (L3/CO1) 1
a=3
b=1
print(a,b)
a,b=b,a
print(a,b)
a. 3 1 1 3 b. 3 1 3 1 c. 1 3 1 3 d. 1 3 3 1
3 Which of the following blocks will always be executed whether an (L2/CO2) 1
exception is encountered or not in a program?
a. try b. except c. finally d. catch
25331344
25331344
25331344
4 What is fruitful function in Python (L4/CO2) 1
a. function b. function c. function d.none
which will which will not which will send
return value return value value.
5 What will be the Postfix expression for (a+b+c)*d (L5/CO3) 1
a. ab+c+d* b. ab+cd+* c. abc++cd* d. None
6 Data Structure is Classified into : (L1/CO3) 1
a. Linear b. Non-Linear c. Non- d. All of these
Primitive
Page 1
7 What is a hash table? (L1/CO4) 1
a. A structure b. A structure c. A structure
d. A structure
that maps that maps keys used for used to
values to keys to values storage implement
stack and
queue
8 Which of the following is not a collision resolution technique? (L2/CO4) 1
25331344
25331344
25331344
a. Separate b. Linear c. Quadratic d. Hashing
chaining probing probing
9 For a binary search algorithm to work, it is necessary that the array (L2/CO5) 1
(list) must be
a. Sorted b. Unsorted c. In Heap d. Popped out
of stack
10 Binary Search can be categorized into which of the following? (L2/CO5) 1
a. Brute Force b. Divide-and- c. Greedy d. Dynamic
technique conquer method programming
11 Which sorting is also called divide and conquer sorting (L2/CO5) 1
a. Quick sort b. Bubble sort c. Merge sort d. Both a & c
25331344
25331344
25331344
12 What will be the output of the following code. (L3/CO1) 1
dict1 = {'first' : 'sunday', 'second' : 'monday'}
dict2={1:3, 2:4}
dict1.update(dict2)
print(dict1)
a. { 'first': b. {'first': c. {1: 3, 2: 4} d. None of
'sunday', 'sunday', these
'second': 'second':
'monday', 'monday'}
1:3, 2:4}
Q. 2 Solve the following. 12
A) Explain features of Python in detail. (L1/CO1) 6
25331344
25331344
25331344
B) Explain concept of stack with its operations. (L2/CO3) 6
Q.3 Solve the following. 12
A) Define tree data structure. Explain different types of tree with (L1/CO4) 6
examples
B) Write an algorithm for bubble sort? Sort following elements with (L2/CO5) 6
bubble sir 45,67,23,13,20,10
Q. 4 Solve Any Two of the following. 12
A) Explain concept of Inheritance and its types in python with syntax. (L2/CO2) 6
Page 2
B) Construct a Binary search tree for following data and perform in (L3/CO4) 6
order, preorder and postorder 20,3,13,16,30,56,10,24,56
C) Write a python program to search element using Binary search (L2/CO5) 6
method
Q.5 Solve Any Two of the following. 12
A) Write an algorithm for quick sort and insertion sort method. (L2/CO5) 6
25331344
25331344
25331344
B) Write a python program to construct BST and perform Preorder tree (L3/CO4) 6
traversal.
C) Explain following a. Abstraction b. encapsulation c. class (L1/CO2) 6
Q. 6 Solve Any Two of the following. 12
A) Convert following infix expression to postfix : (L3/CO3) 6
a. (x+y)^2 + (a+b)^2
b. (p + q – r ) * ( s + t )
B) Explain Linked list and its types with representation. (L2/CO3) 6
C) Write a python program to perform arithmetic operations using (L2/CO2) 6
function.
*** End ***
25331344
25331344
25331344
25331344
25331344
25331344
Page 3