uiz Space

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

Programming, Data Structures and Algorithms using Python Quiz 1: 13 July 2025 (May 2025 term)

The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 1 paper sat on 13 Jul 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
9
MSQ
3
Numerical
4

Updated

Official paper: IIT M DIPLOMA AN EXAM QDD2 13 July 2025 · No negative marking.

Question 1

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

Correct answer

  • C

Question 2

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

Correct answer

  • C

Question 3

+3 marksOne correct option

When using the binary search algorithm on a sorted list, consider the maximum number of comparisons it might take in the worst-case scenario to find an item or confirm it's absent. If the total number of items in this sorted list is doubled, how does this maximum number of comparisons change?

  1. A

    It doubles

  2. B

    It remains the same

  3. C

    It becomes half

  4. D

    It increases by 1

Show answer

Correct answer

  • D

    It increases by 1

Question 4

+3 marksOne correct option
  1. A

    When the input array is already sorted; the algorithm still performs redundant checks.

  2. B

    When the input array is sorted in reverse (descending) order; each element needs to be compared against and shifted past all previously sorted elements.

  3. C

    When the input array contains many duplicate elements; handling duplicates requires extra comparisons.

  4. D

    When the input array elements are randomly distributed; the lack of order maximizes the average number of shifts required.

Show answer

Correct answer

  • B

    When the input array is sorted in reverse (descending) order; each element needs to be compared against and shifted past all previously sorted elements.

Question 5

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

Correct answer

  • D

Question 6

+3 marksOne correct option
  1. A

    Choosing a median value as the pivot for each recursive call.

  2. B

    Choosing either the smallest or the largest element as the pivot at each recursive call.

  3. C

    Choosing either the first or the last position element as the pivot at each recursive call.

  4. D

    Partitioning the array into two roughly equal halves at each recursive call.

Show answer

Correct answer

  • B

    Choosing either the smallest or the largest element as the pivot at each recursive call.

Question 7

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

Correct answer

  • D

Question 8

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

Correct answer

  • A

Question 9

+3 marksOne correct option
  1. A

    3

  2. B

    4

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • D

    7

Question 10

+3 marksOne or more correct options

Select all that apply.

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

Correct answers

  • C
  • D

Question 11

+3 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • C
  • E

Question 12

+4 marksOne or more correct options

Select all that apply.

  1. A

    (1,4)

  2. B

    (2,4)

  3. C

    (3,4)

  4. D

    (3,5)

  5. E

    (4,5)

  6. F

    (1, 5)

Show answer

Correct answers

  • B

    (2,4)

  • D

    (3,5)

  • E

    (4,5)

Question 13

+3 marksNumerical answer
Show answer

Correct answer: 8

Question 14

+3 marksNumerical answer
Show answer

Correct answer: 10

Question 15

+3 marksNumerical answer
Show answer

Correct answer: 2

Question 16

+4 marksNumerical answer
Show answer

Correct answer: 30