Quiz Space

PDSA Quiz 2: 12 April 2026 (January 2026 term)

Question 1

+3 marksOne correct option

Which of the following statements is/are correct about Dijkstra's algorithm to find the shortest path? I. The shortest path returned by Dijkstra's algorithm always passes through the least number of vertices. II. To decide which vertex to visit next, Dijkstra's algorithm selects the vertex with the minimum known distance among all unvisited vertices.

  1. A

    Only I is correct

  2. B

    Only II is correct

  3. C

    Both I and II are correct

  4. D

    Both I and II are incorrect

Also asked in Quiz 2 12 Apr 2026

Question 2

+3 marksOne correct option

The Bellman–Ford algorithm can be used to detect the presence of a negative-weight cycle reachable from the source vertex in a weighted directed graph. Which of the following correctly explains how Bellman–Ford detects a negative-weight cycle?

  1. A

    A negative-weight cycle exists if the shortest distance to any vertex becomes negative at any point during the algorithm.

  2. B

    If, after performing exactly relaxation iterations, an additional relaxation of any edge further reduces a distance value, then a negative-weight cycle is present.

  3. C

    If the algorithm encounters an edge with a negative weight during relaxation, it immediately concludes that a negative-weight cycle exists.

  4. D

    If multiple shortest paths exist between two vertices, the graph must contain a negative-weight cycle.

Also asked in Quiz 2 12 Apr 2026

Question 3

+3 marksOne correct option

Which of the following correctly represents the final max-heap after inserting elements 1, 2, 3, 5, 7, 6, and 4 in the given order one by one, starting with an empty heap? Note:- Ensure that the max-heap property is maintained after each insertion.

  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Also asked in Quiz 2 12 Apr 2026

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 12 Apr 2026 paper

The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 2 paper sat on 12 Apr 2026, in the January 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 12 Apr 2026 at a glance
TermJanuary 2026 term
SubjectProgramming, Data Structures and Algorithms using Python
Course codeBSCS2002
Questions16
Marks50
Duration120 min
MCQ10
MSQ2
Written4
Official paperProgramming, Data Structures And Algorithms Using Python 06 Apr 26
Negative markingNo negative marking.
Updated

Same Quiz 2, other subjects

More PDSA