PDSA End Term 21 Dec 2025 — Question 48
Show answer
Correct answer
Question 48 of 50 in the IIT Madras BS Programming, Data Structures and Algorithms using Python (PDSA) End Term paper sat on 21 Dec 2025, in the September 2025 term (Programming, Data Structures And Algorithms Using Python 18 Dec 25). It carries 4 marks.
More questions from this paper
- Here is a function to return the count of odd numbers in the list. There is a logical error in this function. Select th…
- Here is a function to return the count of even numbers in the list. There is a logical error in this function. Select t…
- Match the correct asymptotic complexity for each function.
- Match the correct asymptotic complexity for each function.
- Consider the below function for selection sort algorithm. Assume that the list L=[25, 17, 20, 10, 15] is passed to the …
- Consider the below function for selection sort algorithm. Assume that the list L=[15, 12, 18, 13, 11] is passed to the …
- Which of the following scenarios is an example where linear search is more practical or efficient than the binary searc…
- Which of the following scenarios is an example where linear search is more practical or efficient than binary search?
- Consider the following class Node: Consider an implementation of a linked list where each node is created using the giv…
- Suppose we are sorting a list of eight integers using quicksort, and we have just finished the first partitioning. The …
- If you have an empty stack and you perform the following sequence of operations: What is the value of the top element o…
- Consider the following class Node: Consider an implementation of a linked list where each node is created using the giv…
- A directed graph G has 7 vertices. What is the maximum number of edges in G?
- If you have an empty stack and you perform the following sequence of operations: What is the value of the top element o…
- Consider the following DAG. How many valid topological sorts exist?
- There are 8 systems (0,..,7) connected in network as shown in the figure given below. Which edge should we add to the n…
- There are 7 systems (0,..,6) connected in a network as shown in the figure given below. Which of the following system (…
- Consider the following DAG. How many valid topological sorts exist?
- Consider a directed graph given below:\ Vertices: {0,1,2,3}\ Edge weights: (0, 1) = 1 (0, 2) = 4 (1, 2) = 2 (1, 3) = 6 …
- Figure question
- In the Floyd–Warshall algorithm, which of the following are true?
- Consider the following graph. What is the shortest distance from node 0 to node 5?
- Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 2, 5, 7, 9, 12, 14. The maximum p…
- Suppose we run the Bellman-Ford algorithm on a graph with non-negative edges. Then compared to Dijkstra's algorithm, th…
- Consider a binary tree with 21 nodes, where the number of nodes with two children is 9. The number of nodes with one ch…
- Figure question
- Consider the following max-heap. Which of the following cannot be the last element inserted into the heap?
- Consider a binary tree with 15 nodes, where the number of nodes with two children is 6. The number of nodes with one ch…
- If we perform the following operations in the given order on the min-heap [12, 25, 18, 40, 35, 30, 28, 50, 45] then the…
- If we perform the following operations in the given order on the max-heap [89, 62, 31, 45, 51, 29, 30, 42, 34] then the…
- What is the maximum number of nodes in an AVL tree of height 9? Consider that the height of the empty tree is 0.
- What is the minimum number of nodes in an AVL tree of height 7? Consider that the height of the empty tree is 0.
- Figure question
- Figure question
- For which of the following coin denominations does the Greedy strategy of choosing the largest coin that does not excee…
- For which of the following coin denominations does the Greedy strategy of choosing the largest coin that does not excee…
- In a list L, two elements L[i] and L[j] form an inversion if L[i] > L[j] and i \< j . The total number of inversions fo…
- In a list L, two elements L[i] and L[j] form a significant inversion if L[i] > 2 L[j] and i \< j . The total number of …
- Figure question
- Figure question
- Consider the following function MoM. What median value will be returned by the given MoM function for the following lis…
- Consider the following function MoM.
- Consider the function mystery() that takes strings X and Y as input. What will mystery('ABCDFGH','ACDFHBG') return? LCS…
- Consider the function mystery() that takes strings X and Y as input. What will mystery('XYITCRT','WTXITRY') return? LCS…
- Consider the following grid.
- Consider the following grid.
- Figure question
- Figure question
- Figure question