Quiz Space

PDSA Quiz 2: 16 August 2026 (May 2026 term)

Question 1

+3 marksOne or more correct options

Which of the following statements is true about Dijkstra's algorithm to find the shortest path?

Select all that apply.

  1. A

    Dijkstra’s algorithm may fail for graphs with negative weights because it does not reconsider a node once it marks it as visited, even if there is a shorter path than the previous one.

  2. B

    The shortest path between two vertices and in a graph always remains unaltered when all the edges of are incremented by an equal amount.

  3. C

    The shortest path between two vertices and in a graph always remains unaltered when all the edges of are multiplied by a positive integer.

  4. D

    To decide which node to visit next, Dijkstra's algorithm selects the unvisited node with the smallest known distance.

Question 2

+3 marksOne correct option

Let G = (V, E) be an undirected graph having distinct positive edge weights. Let V be partitioned into two non-empty sets X and Y. Let e = (s, t) be the minimum cost edge, with s belonging to X and t belonging to Y. Which of the following statement(s) is/are true? 1. The edge e must belong to each path from s to t. 2. The edge e must belong to the minimum cost spanning tree of G.

  1. A

    Only 1

  2. B

    Only 2

  3. C

    Both 1 and 2

  4. D

    Neither 1 nor 2

Also asked in Quiz 2 3 Dec 2023

Question 3

+3 marksOne correct option

Which of the following statements about the Floyd-Warshall algorithm is correct?

  1. A

    It can compute shortest paths only in graphs with non-negative edge weights.

  2. B

    It computes shortest paths from a single source vertex to all other vertices.

  3. C

    It computes shortest paths between every pair of vertices and can handle negative edge weights, provided there is no negative cycle.

  4. D

    It requires the graph to be acyclic.

13 more questions in this paper

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.

More on the PDSA Quiz 2 16 Aug 2026 paper

The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 2 paper sat on 16 Aug 2026, in the May 2026 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.

FeaturePDSA Quiz 2 16 Aug 2026 at a glance
TermMay 2026 term
SubjectProgramming, Data Structures and Algorithms using Python
Course codeBSCS2002
Questions16
Marks50
Duration120 min
MSQ2
MCQ11
Written3
Official paperProgramming, Data Indian Institute Of Technology, Madras - Bs In Data Science And Applications Structures And Algorithms Using Python 14 Aug 26
Negative markingNo negative marking.
Updated

Same Quiz 2, other subjects

More PDSA