uiz Space

May 2025 term · Programming, Data Structures and Algorithms using Python · BSCS2002

Programming, Data Structures and Algorithms using Python Quiz 2: 3 August 2025 (May 2025 term)

The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 2 paper sat on 3 Aug 2025, in the May 2025 term: 16 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
16
Marks
50
Duration
120 min
MCQ
10
MSQ
3
Numerical
3

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 03 Aug 2025 · No negative marking.

Question 1

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 2

+4 marksOne correct option
  1. A

    [12, 18, 20, 19, 32, 37, 27, 26, 29]

  2. B

    [12, 18, 20, 19, 32, 27, 37, 29, 26]

  3. C

    [12, 18, 19, 20, 27, 32, 37, 29, 26]

  4. D

    [12, 20, 18, 19, 32, 27, 37, 26, 29]

Show answer

Correct answer

  • B

    [12, 18, 20, 19, 32, 27, 37, 29, 26]

Question 3

+3 marksOne correct option

Consider the given statements below about Prim's algorithm's behaviour and properties. i. The choice of the starting vertex can lead to different Minimum Spanning Trees if multiple MSTs exist with the same total weight.
ii. Prim's algorithm first sorts all edges in the graph by weight.
iii. The algorithm maintains a set of visited vertices and, at each step, selects the minimum weight edge connecting a visited vertex to an unvisited vertex.
Which of the given statements are True?

  1. A

    Statements i and ii

  2. B

    Statements ii and iii

  3. C

    Statements i and iii

  4. D

    All statements i, ii and iii

Show answer

Correct answer

  • C

    Statements i and iii

Question 4

+3 marksOne correct option
  1. A

    7

  2. B

    8

  3. C

    9

  4. D

    10

Show answer

Correct answer

  • A

    7

Question 5

+3 marksOne correct option
  1. A

    71

  2. B

    36

  3. C

    37

  4. D

    29

Show answer

Correct answer

  • D

    29

Question 6

+3 marksOne correct option

Consider the following statements and select the correct option.
i. The greedy technique always gives an optimized solution to the problem.
ii. Bellman-Ford and Floyd-Warshal algorithms use the greedy technique to solve the path problems.

  1. A

    Statements (i) and (ii) are false.

  2. B

    Statements (i) and (ii) are true.

  3. C

    Statement (i) is true and Statement (ii) is false.

  4. D

    Statement (i) is false and Statement (ii) is true.

Show answer

Correct answer

  • A

    Statements (i) and (ii) are false.

Question 7

+3 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 8

+3 marksOne correct option
  1. A

    328

  2. B

    82

  3. C

    100

  4. D

    126

Show answer

Correct answer

  • D

    126

Question 9

+3 marksOne correct option
  1. A

    A-3, B-1, C-2, D-4

  2. B

    A-4, B-1, C-3, D-2

  3. C

    A-4, B-1, C-2, D-3

  4. D

    A-1, B-3, C-2, D-4

Show answer

Correct answer

  • C

    A-4, B-1, C-2, D-3

Question 10

+3 marksOne correct option
  1. A

    15

  2. B

    9

  3. C

    14

  4. D

    17

Show answer

Correct answer

  • A

    15

Question 11

+3 marksOne or more correct options

Which of the following is/are True about Bellman-Ford algorithm?

Select all that apply.

  1. A

    It can handle disconnected graphs.

  2. B

    The shortest path is not stabilized, if there are negative cycles.

  3. C

    It can handle negative edge weights, but not negative cycles.

  4. D

    It uses the greedy approach to find the shortest path.

Show answer

Correct answers

  • A

    It can handle disconnected graphs.

  • B

    The shortest path is not stabilized, if there are negative cycles.

  • C

    It can handle negative edge weights, but not negative cycles.

Question 12

+3 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • B

Question 13

+3 marksOne or more correct options

Which of the following statements are true about the finding the closest pair of points using divide and conquer strategy?

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • A
  • B
  • C

Question 14

+3 marksNumerical answer
Show answer

Correct answer: 15

Question 15

+3 marksNumerical answer
Show answer

Correct answer: 31

Question 16

+3 marksNumerical answer
Show answer

Correct answer: 12