Question 1
In the given graph, if we try to find the shortest path from node P to all other nodes using
Dijkstra’s algorithm, which node is the
node to be included in the visited set? Consider that P is the 1st visited node.
U
R
S
T
In the given graph, if we try to find the shortest path from node P to all other nodes using
Dijkstra’s algorithm, which node is the
node to be included in the visited set? Consider that P is the 1st visited node.
U
R
S
T
Consider the following algorithm to solve the single source shortest path problem for a graph (directed or undirected) with positive integer edge weights and a source vertex s.Replace each edge (u,v) of weight w in the graph with a path of length w consisting of unit-weight edges from u to v (by introducing new intermediate vertices).
For example: edge (u, v) with weight w = 3
Run BFS on this modified graph from the source s to find the shortest path to each of the original vertices in the graph.
Which of the following statements is/are true?
I. The algorithm solves the single source shortest path problem correctly.
II. Although the size of the modified graph is larger than the original graph, the algorithm is as efficient as Dijkstra’s algorithm.
I is True but II is False
I is False but II is True
Both I and II are False
Both I and II are True
What is the weight of a minimum spanning tree in the graph given below?
Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.
The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 2 paper sat on 23 Nov 2025, in the September 2025 term: 16 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.
| Feature | PDSA Quiz 2 23 Nov 2025 at a glance |
|---|---|
| Term | September 2025 term |
| Subject | Programming, Data Structures and Algorithms using Python |
| Course code | BSCS2002 |
| Questions | 16 |
| Marks | 50 |
| Duration | 120 min |
| MCQ | 9 |
| Numerical | 4 |
| MSQ | 3 |
| Official paper | IIT M DIPLOMA AN EXAM QDD2 23 Nov 2025 NEW |
| Negative marking | No negative marking. |
| Updated |