Question 1
A-II, B-I, C-III, D-IV
A-II, B-I, C-IV, D-III
A-I, B-II, C-III, D-IV
A-III, B-II, C-IV, D-I

The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 2 paper sat on 1 Dec 2024, in the September 2024 term: 16 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
A-II, B-I, C-III, D-IV
A-II, B-I, C-IV, D-III
A-I, B-II, C-III, D-IV
A-III, B-II, C-IV, D-I
Correct answer
A-II, B-I, C-III, D-IV
B, E, C, F, A, D, G
B, E, F, A, C, G, D
B, E, F, C, A, G, D
B, E, F, A, C, D, G
Correct answer
B, E, F, C, A, G, D
Only statement 1 is correct.
Only statement 2 is correct.
Both statements are correct.
Both statements are incorrect.
Correct answer
Both statements are correct.
C
E
F
I
Correct answer
E
14
15
16
17
Correct answer
14
Select the correct match of recurrence relation with corresponding complexity.
A-2, B-4, C-3, D-1
A-2, B-3, C-4, D-1
A-2, B-3, C-1, D-4
A-3, B-2, C-4, D-1
Correct answer
A-2, B-3, C-4, D-1
Apply the divide and conquer strategy to find the closest pair of points in a set. After dividing the set into two halves and recursively finding the closest pairs in each half, what additional step is required?
Combine the results directly
Perform a linear search for the closest pair
Consider pairs that span both halves
Sort the points by their distances
Correct answer
Consider pairs that span both halves
Only statement 1 is correct.
Only statement 2 is correct.
Both statements are correct.
Both statements are incorrect.
Correct answer
Only statement 2 is correct.
Correct answer: 12
Correct answer: 88
Correct answer: 5
Correct answer: 136
Correct answers
Consider a min-heap with 45 distinct elements implemented using array A with index 0 to 44. The largest element can not be in between ___.
A[11] and A[21] (both inclusive)
A[0] and A[10] (both inclusive)
A[31] and A[44] (both inclusive)
A[22] and A[30] (both inclusive)
Correct answers
A[11] and A[21] (both inclusive)
A[0] and A[10] (both inclusive)
1
2
3
0
Correct answer
1
15 bits
16 bits
17 bits
18 bits
Correct answer
18 bits