PDSA End Term: 24 December 2023, Set ADD3 (September 2023 term)
The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) End Term paper sat on 24 Dec 2023, in the September 2023 term, set ADD3: 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
- 17
- 3
- 5
Show answer
Correct answer
Question 2
Show answer
Correct answer
Question 3
4
6
9
10
Show answer
Correct answer
9
Question 4
Show answer
Correct answer
Question 5
A
B
C
D
Show answer
Correct answer
D
Question 6
Show answer
Correct answer
Question 7
1, 4, 3, 6, 5, 2
1, 4, 5, 6, 3, 2
1, 4, 6, 5, 3, 2
1, 4, 6, 3, 5, 2
Show answer
Correct answer
1, 4, 6, 5, 3, 2
Question 8
This strategy will not solve the problem correctly.
This strategy will only work if the graph is acyclic.
This strategy will solve the problem correctly and is as efficient as Dijkstra’s algorithm.
This strategy will solve the problem correctly, but is not as efficient as Dijkstra’s algorithm.
Show answer
Correct answer
This strategy will solve the problem correctly, but is not as efficient as Dijkstra’s algorithm.
Question 9
Show answer
Correct answer
Question 10
[40, 20, 5, 15, 23, 10, 3, 2]
[40, 23, 10, 15, 20, 2, 3, 5]
[40, 23, 20, 15, 10, 2, 3, 5]
[40, 23, 10, 20, 15, 2, 3, 5]
Show answer
Correct answer
[40, 23, 10, 20, 15, 2, 3, 5]
Question 11
19
15
16
21
Show answer
Correct answer
15
Question 12
4
5
6
7
Show answer
Correct answer
5
Question 13
Show answer
Correct answer
Question 14
Show answer
Correct answer
Question 15
Which of the following combination of input text T and pattern P will exhibit the worst case running time behavior for Boyer-Moore skipping heuristic?
Show answer
Correct answer
Question 16
2x + y <= 50
x + 2y <= 50
x >= 0 , y >= 0
x + 2y <= 40
Show answer
Correct answer
x + 2y <= 50
Question 17
It can be modelled as a network flow problem, where the source node is connected to every teacher node in G with capacity of n, and every subject node in G is connected to the sink node with capacity of 2n.
It can be modelled as a network flow problem, where the source node is connected to every teacher node in G, and every subject node in G is connected to the sink node. All edges in the network flow graph have equal capacity.
It can be modelled as a network flow problem, where the source node is connected to every teacher node in G with capacity of 2, and every subject node in G is connected to the sink node with capacity of 1.
It can be modelled as a network flow problem, where the source node is connected to every teacher node in G with capacity of 1, and every subject node in G is connected to the sink node with capacity of 2.
Show answer
Correct answer
It can be modelled as a network flow problem, where the source node is connected to every teacher node in G with capacity of 2, and every subject node in G is connected to the sink node with capacity of 1.
Question 18
E - F - C - D - B - A
F - E - A - C - D - B
F - E - A - D - C - B
E - F - C - D - A - B
F - C - D - A - E - B
Show answer
Correct answers
E - F - C - D - B - A
F - E - A - C - D - B
E - F - C - D - A - B
Question 19
Which of the following is/are true about the Floyd-Warshall algorithm?
Show answer
Correct answers
Question 20
Which of the following is/are true about AVL Tree? Assume that the height of the empty tree is 0.
Show answer
Correct answers
Question 21
Consider a simple undirected connected graph G with 65 edges with the least number of vertices possible. What will be the number of vertices in graph G?
Show answer
Correct answer: 12
Question 22
In a binary tree T of 25 nodes, if the number of nodes with two children is 6, then the number of nodes with one child is ___ .
Show answer
Correct answer: 12
Question 23
The pre-order traversal of a binary search tree is:
4, 1, 3, 2, 7, 5, 6, 8
What would be the sum of elements stored in the leaf nodes of a binary search tree?
Show answer
Correct answer: 16
Question 24
Show answer
Correct answer: 3
Question 25
Show answer
Correct answer: 26
