
Programming, Data Structures and Algorithms using Python Quiz 1: 23 February 2025 (January 2025 term)
The IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) Quiz 1 paper sat on 23 Feb 2025, in the January 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.
- 16
- 50
- 120 min
- 10
- 3
- 3
Show answer
Correct answer
Question 2
Show answer
Correct answer
Question 3
Show answer
Correct answer
Question 4
The number of comparisons is the minimum when the input list is in ascending order.
The number of comparisons is the maximum when the input list is in descending order.
The number of comparisons is the same irrespective of the order of the elements in the input list.
The number of comparisons depends on the number of swaps made during the process.
Show answer
Correct answer
The number of comparisons is the same irrespective of the order of the elements in the input list.
Question 5
The number of shifts is always equal to the number of comparisons.
The number of shifts is minimum when the input list is in ascending order.
The number of shifts is minimum when the input list is in descending order.
The number of shifts is independent of the order of the elements in the input list.
Show answer
Correct answer
The number of shifts is minimum when the input list is in ascending order.
Question 6
What is the time complexity for the worst case behaviour of Merge Sort ?
Show answer
Correct answer
Question 7
Show answer
Correct answer
Question 8
Consider the following statements:
1. A stack can be used to check whether a word is a palindrome
2. A stack can be used to check if parentheses in an expression are balanced.
3. A stack used to manage print jobs in a printer spooler.
Choose the correct option regarding the given statements.
Note: A palindrome is a word that reads the same forwards and backwards. e.g: radar
Statement 1 and Statement 3 are true
Statement 2 and Statement 3 are true
Statement 1 and Statement 2 are true
All statements are true
Show answer
Correct answer
Statement 1 and Statement 2 are true
Question 9
Show answer
Correct answer
Question 10
E A
C B
C A
E B
Show answer
Correct answer
E A
Question 11
Insertion of the new node at the front of the linked list.
Insertion of the new node at the end of the linked list.
Deletion of the first node of the linked list.
Deletion of the last node of the linked list.
Search for any element in the linked list
Show answer
Correct answers
Insertion of the new node at the front of the linked list.
Insertion of the new node at the end of the linked list.
Deletion of the first node of the linked list.
Question 12
Show answer
Correct answers
Question 13
Show answer
Correct answers
Question 14
Show answer
Correct answer: 4
Question 15
Consider an undirected graph G with 55 edges with the least number of vertices possible. What will be the number of vertices in graph G?
Show answer
Correct answer: 11
Question 16
Show answer
Correct answer: 12