Quiz Space

September 2024 term · Programming, Data Structures and Algorithms using Python · BSCS2002

PDSA End Term: 22 December 2024, Set QDF3 (September 2024 term)

The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) End Term paper sat on 22 Dec 2024, in the September 2024 term, set QDF3: 25 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
25
Marks
100
Duration
180 min
MCQ
18
Numerical
6
MSQ
1

Updated

Official paper: IIT M FOUNDATION DIPLOMA AN EXAM QDF3 22 Dec 2024 · No negative marking.

Question 1

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

Correct answer

  • C

Question 2

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

Correct answer

  • D

Question 3

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

Correct answer

  • D

Question 4

+4 marksOne correct option
  1. A

    55

  2. B

    58

  3. C

    60

  4. D

    48

Show answer

Correct answer

  • C

    60

Question 5

+4 marksOne correct option
  1. A

    0.5

  2. B

    0.33

  3. C

    0.17

  4. D

    0.83

Show answer

Correct answer

  • A

    0.5

Question 6

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

Correct answer

  • A

Question 7

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

Correct answer

  • C

Question 8

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

Correct answer

  • C

Question 9

+4 marksOne correct option
  1. A

    Only 1

  2. B

    Only 2

  3. C

    Both 1 and 2

  4. D

    Neither 1 nor 2

Show answer

Correct answer

  • A

    Only 1

Question 10

+4 marksOne correct option
  1. A

    Only statement I is true

  2. B

    Only statement II is true

  3. C

    Both statements are true

  4. D

    Both statements are not true

Show answer

Correct answer

  • A

    Only statement I is true

Question 11

+4 marksOne correct option

Consider a complete binary tree with n nodes, where the left and the right subtrees of the root are min heaps. The upper bound to convert the tree to a min heap by an efficient algorithm is _______.

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

Correct answer

  • D

Question 12

+4 marksOne correct option

Which of the following statement(s) is/are correct about the traversals in a binary search tree? 1. The root of the tree is always the first element of the inorder traversal.
2. The root of the tree is always the last element of the postorder traversal.

  1. A

    Only statement 1 is correct

  2. B

    Only statement 2 is correct

  3. C

    Both the statements are correct

  4. D

    None of the statements are correct

Show answer

Correct answer

  • B

    Only statement 2 is correct

Question 13

+4 marksOne correct option
  1. A

    6

  2. B

    7

  3. C

    8

  4. D

    9

Show answer

Correct answer

  • D

    9

Question 14

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

Correct answer

  • C

Question 15

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

Correct answer

  • B

Question 16

+4 marksOne correct option
  1. A

    1000

  2. B

    1500

  3. C

    2000

  4. D

    2500

Show answer

Correct answer

  • B

    1500

Question 17

+4 marksOne correct option

A popular conference is being held, and there are several types of seats: VIP, Regular, and Economy. Each type of seat has a limited number of available spots. Each attendee has a preference for the type of seat they want, and the total number of attendees is greater than the number of available seats. The goal is to allocate the seats to attendees such that each attendee is assigned to their preferred seat type, and no seat type exceeds its capacity.
How can the given problem of allocating seats to attendees based on their preferences and seat type capacities be effectively solved?

  1. A

    Using a greedy algorithm to assign seats based on attendee preferences.

  2. B

    Modeling the problem as a maximum flow network with capacities representing seat limits and flows representing the number of attendees assigned to each seat type.

  3. C

    Implementing a first-come, first-serve approach without considering the preferences or seat type capacities.

  4. D

    Assigning all attendees to the VIP seats first and distributing the remaining attendees among Regular and Economy seats.

Show answer

Correct answer

  • B

    Modeling the problem as a maximum flow network with capacities representing seat limits and flows representing the number of attendees assigned to each seat type.

Question 18

+4 marksOne correct 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 class NP.
2. If an NP-hard problem A is polynomial time reducible to another problem B, then B is NP- complete.
Which of the following option is correct?

  1. A

    Only statement 1 is true

  2. B

    Only statement 2 is true

  3. C

    Both statements 1 and 2 are true

  4. D

    Both statements 1 and 2 are false

Show answer

Correct answer

  • D

    Both statements 1 and 2 are false

Question 19

+4 marksNumerical answer
Show answer

Correct answer: 8

Question 20

+4 marksNumerical answer
Show answer

Correct answer: 20

Question 21

+4 marksNumerical answer
Show answer

Correct answer: 14

Question 22

+4 marksNumerical answer
Show answer

Correct answer: 4

Question 23

+4 marksNumerical answer
Show answer

Correct answer: 135

Question 24

+4 marksNumerical answer
Show answer

Correct answer: 10

Question 25

+4 marksOne or more correct options

Select all that apply.

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

Correct answers

  • B
  • D