Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Programming, Data Structures and Algorithms using Python
Quiz 2 · 3 Aug 2025 (Afternoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q2MCQ4 Marks·Choose one option

- A[12, 18, 20, 19, 32, 37, 27, 26, 29]
- B[12, 18, 20, 19, 32, 27, 37, 29, 26]
- C[12, 18, 19, 20, 27, 32, 37, 29, 26]
- D[12, 20, 18, 19, 32, 27, 37, 26, 29]
- Q3MCQ3 Marks·Choose one 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?
- AStatements i and ii
- BStatements ii and iii
- CStatements i and iii
- DAll statements i, ii and iii
- Q4MCQ3 Marks·Choose one option

- A7
- B8
- C9
- D10
- Q5MCQ3 Marks·Choose one option

- A71
- B36
- C37
- D29
- Q6MCQ3 Marks·Choose one 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.
- AStatements (i) and (ii) are false.
- BStatements (i) and (ii) are true.
- CStatement (i) is true and Statement (ii) is false.
- DStatement (i) is false and Statement (ii) is true.
- Q7MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q8MCQ3 Marks·Choose one option

- A328
- B82
- C100
- D126
- Q9MCQ3 Marks·Choose one option

- AA-3, B-1, C-2, D-4
- BA-4, B-1, C-3, D-2
- CA-4, B-1, C-2, D-3
- DA-1, B-3, C-2, D-4
- Q10MCQ3 Marks·Choose one option

- A15
- B9
- C14
- D17
- Q11MSQ3 Marks·Choose all correct options
Which of the following is/are True about Bellman-Ford algorithm?
- AIt can handle disconnected graphs.
- BThe shortest path is not stabilized, if there are negative cycles.
- CIt can handle negative edge weights, but not negative cycles.
- DIt uses the greedy approach to find the shortest path.
- Q12MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q13MSQ3 Marks·Choose all correct options
Which of the following statements are true about the finding the closest pair of points using divide and conquer strategy?
- A

- B

- C

- D

- A
- Q14NAT3 Marks·Write the number
Your answer: - Q15NAT3 Marks·Write the number
Your answer: - Q16NAT3 Marks·Write the number
Your answer: