Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Programming, Data Structures and Algorithms using Python
End Term · 22 Dec 2024 (Forenoon)
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

- AIt finds the smallest element in D from index s1 to s2, both inclusive.
- BIt reverses the list D between indices s1 and s2, both inclusive
- CIt performs a merge sort in-place on this list D between indices s1 and s2, both inclusive
- DIt swaps the elements in D at indices s1 and s2, and leaves the remaining elements unchanged.
- Q2MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q3MCQ4 Marks·Choose one option

- A70
- B100
- C35
- D111
- Q4MCQ4 Marks·Choose one option

- A0.2
- B0.4
- C0.6
- D0.8
- Q5MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q6MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q7MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q8MCQ4 Marks·Choose one option

- AOnly statement I is true
- BOnly statement II is true
- CBoth statements are true
- DBoth statements are not true
- Q9MCQ4 Marks·Choose one option
Which of the following statement(s) is/are correct about the traversals in a binary search tree? 1. The inorder traversal sorts the elements in descending order. 2. The root of the tree is always the first element of the postorder traversal.
- AOnly statement 1 is correct
- BOnly statement 2 is correct
- CBoth the statements are correct
- DNone of the statements are correct
- Q10MCQ4 Marks·Choose one option

- A1
- B2
- C3
- D4
- Q11MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q12MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q13MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q14MCQ4 Marks·Choose one option
Which of the following is true about a minimum cut in a network? 1. It is the cut that separates the source and the sink with the minimum number of edges. 2. It is the cut that separates the source and the sink with the minimum sum of capacities of the edges.
- AOnly statement 1 is true.
- BOnly statement 2 is true.
- CBoth statement 1 and 2 are true.
- DBoth statement 1 and 2 are not true.
- Q15MCQ4 Marks·Choose one option
Consider the following statements. 1. If an NP-hard problem A is polynomial time reducible to another problem B, then B belongs to the NP class. 2. There exists polynomial time checking algorithm for all problems in the class P. Which of the following option is correct?
- AOnly statement 1 is true
- BOnly statement 2 is true
- CBoth statements 1 and 2 are true
- DBoth statements 1 and 2 are false
- Q16MSQ4 Marks·Choose all correct options

- AP Q R S T U V
- BP R Q V S U T
- CP Q R S V U T
- DP R Q S V T U
- Q17MSQ4 Marks·Choose all correct options

- A(1,2)
- B(1,4)
- C(2,4)
- D(0,3)
- E(0,2)
- Q18NAT4 Marks·Write the number
Your answer: - Q19NAT4 Marks·Write the number
Your answer: - Q20NAT4 Marks·Write the number
Your answer: - Q21NAT4 Marks·Write the number
Your answer: - Q22NAT4 Marks·Write the number
Your answer: - Q23NAT4 Marks·Write the number
Your answer: - Q24NAT4 Marks·Write the number
Your answer: - Q25NAT4 Marks·Write the number
Your answer: