Quiz Space

Programming in Python · Quiz 2 · 12 Apr 2026 · January 2026 term

Question 12: Consider a min-heap implemented using an array with dist…

Question 12

+3 marksOne or more correct options

Consider a min-heap implemented using an array with distinct elements. Which of the following statements about the time complexity of operations on a min-heap is/are true in the worst case?

Select all that apply.

  1. A

    Inserting a new element into a min-heap can be performed in time.

  2. B

    Finding the second minimum element in a min-heap can be performed in time.

  3. C

    Finding the maximum element in a min-heap can be performed in time.

  4. D

    Deleting the minimum element from a min-heap can be performed in time.

Show answer

Correct answers

  • A

    Inserting a new element into a min-heap can be performed in time.

  • B

    Finding the second minimum element in a min-heap can be performed in time.

Question 12 of 16 in the IIT Madras BS Programming in Python (Python) Quiz 2 paper sat on 12 Apr 2026, in the January 2026 term (Programming, Data Structures And Algorithms Using Python 06 Apr 26). It carries 3 marks.

This question was also asked in

More questions from this paper

  1. Q1Which of the following statements is/are correct about Dijkstra's algorithm to find the shortest path? I. The shortest …
  2. Q2The Bellman–Ford algorithm can be used to detect the presence of a negative-weight cycle reachable from the source vert…
  3. Q3Which of the following correctly represents the final max-heap after inserting elements 1, 2, 3, 5, 7, 6, and 4 in the …
  4. Q4The maximum and minimum number of nodes possible in a binary search tree of height 8 are _. Assume that the height of a…
  5. Q5Consider a Binary Search Tree (BST) containing distinct keys. Each node of the BST is defined using the following class…
  6. Q6Suppose the letters {a, b, c, d, e} occur with the following frequencies. How many bits will be used to encode the lett…
  7. Q7Consider a set of activities , where each activity has: • a processing time (time required to complete the activity), a…
  8. Q8In a list , two elements and form a significant inversion if The total number of significant inversions for is _.
  9. Q9Consider the Quick Select algorithm for finding the smallest element in an input list of size containing distinct eleme…
  10. Q10Consider the following strategy to solve a problem of input size . Divide the problem into sub-problems, each of size ,…
  11. Q11Let be a connected complete graph with 4 vertices and 6 edges, where all edge weights are distinct and ordered as: Whic…
  12. Q13Consider the given weighted adjacency matrix for a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Where in …
  13. Q14In the table below, we have 9 activities with the corresponding start and finish times. It might not be possible to com…
  14. Q15An AVL tree contains 120 nodes. What is the maximum possible height of the AVL tree? Assume that the height of an empty…
  15. Q16Consider the following function What median value will be returned by the given function for the following list?