
Programming, Data Structures and Algorithms using Python End Term: 13 April 2025, Set QDD1 (January 2025 term)
The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) End Term paper sat on 13 Apr 2025, in the January 2025 term, set QDD1: 25 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
- 25
- 100
- 180 min
- 14
- 5
- 6
Show answer
Correct answer
Question 2
Show answer
Correct answer
Question 3
Show answer
Correct answer
Question 4
Show answer
Correct answer
Question 5
Show answer
Correct answer
Question 6
5, 3, 2, 1, 1, 1
4, 3, 2, 2, 1, 1
5, 3, 2, 1, 2, 1
4, 2, 2, 1, 1, 1
Show answer
Correct answer
5, 3, 2, 1, 2, 1
Question 7
7
8
9
10
Show answer
Correct answer
8
Question 8
[8, 9, 11, 19, 17, 36, 39, 21, 27]
[8, 9, 11, 19, 17, 36, 39, 27, 21]
[8, 9, 11, 17, 19, 36, 39, 21, 27]
[8, 9, 11, 17, 19, 36, 39, 27, 21]
Show answer
Correct answer
[8, 9, 11, 17, 19, 36, 39, 27, 21]
Question 9
While inserting the elements [16, 8, 19, 13, 26, 21, 23, 14, 31] in an empty binary search tree (BST) in the sequence shown, the element at maximum depth is_____________.
26
21
23
31
Show answer
Correct answer
23
Question 10
1
2
3
4
Show answer
Correct answer
4
Question 11
10
8
6
4
Show answer
Correct answer
4
Question 12
Show answer
Correct answer
Question 13
8
9
10
11
Show answer
Correct answer
11
Question 14
4
5
9
8
Show answer
Correct answer
4
Question 15
13, 24, 32, 26, 63, 12
13, 12, 24, 32, 26, 63
12, 13, 24, 32, 26, 63
63, 26, 32, 24, 13, 12
26, 12, 24, 13, 32, 63
Show answer
Correct answers
13, 12, 24, 32, 26, 63
12, 13, 24, 32, 26, 63
26, 12, 24, 13, 32, 63
Question 16
Suppose we obtain the following BFS tree rooted at node G for an undirected graph with vertices {A, B, C, D, E,F, G, H, I, J, K}.
Which of the following can not be an edge/edges in the original graph?
Show answer
Correct answers
Question 17
Which of the below statements are true about Dynamic programming?
Increases both time complexity and space complexity.
It replaces recursion with iteration, so there are no stack overflow errors.
Increases time complexity and decreases space complexity.
It avoids computing sub-problems more than once.
Show answer
Correct answers
It replaces recursion with iteration, so there are no stack overflow errors.
It avoids computing sub-problems more than once.
Question 18
Show answer
Correct answers
Question 19
Which of these correspond to non-polynomial time complexity?
Show answer
Correct answers
Question 20
Show answer
Correct answer: 7
Question 21
What is the weight of the minimum spanning tree for the given graph?
Show answer
Correct answer: 18
Question 22
Show answer
Correct answer: 161
Question 23
Show answer
Correct answer: 17
Question 24
Show answer
Correct answer: 34
Question 25
Show answer
Correct answer: 8