Questions

  1. GATE CS 2026 Set 1MSQ1 markEasy (estimate)

    GATE CS 2026 Set 1, Q.23

    Let be an odd number greater than . Consider a binary minheap with elements stored in an array whose index starts from . Which of the following indices of…

    Binary Heaps and Priority Queues

  2. GATE CS 2025 Set 1NAT1 markEasy (estimate)

    GATE CS 2025 Set 1, Q.35

    The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap stores 32 keys. The height of ...

    Binary Heaps and Priority Queues

  3. GATE CS 2025 Set 2MCQ2 marksMedium (estimate)

    GATE CS 2025 Set 2, Q.38

    A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures: P: Unsorted doub...

    Arrays and Linked Lists · Binary Heaps and Priority Queues · Binary Trees, Binary Search Trees and Balanced Trees

  4. GATE CS 2024 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2024 Set 1, Q.41

    An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?

    Binary Heaps and Priority Queues

  5. GATE CS 2024 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2024 Set 1, Q.43

    Consider a binary min-heap containing 105 distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible val...

    Binary Heaps and Priority Queues

  6. GATE CS 2023MCQ1 markEasy (estimate)

    GATE CS 2023, Q.12

    Which one of the following sequences when stored in an array at locations forms a max-heap?

    Binary Heaps and Priority Queues

  7. GATE CS 2023MCQ2 marksEasy (estimate)

    GATE CS 2023, Q.46

    Let be a priority queue for maintaining a set of elements. Suppose is implemented using a max-heap data structure. The operation Extract-Max(A) extracts and deletes the...

    Binary Heaps and Priority Queues

  8. GATE CS 2021 Set 2MCQ1 markEasy (estimate)

    GATE CS 2021 Set 2, Q.12 (CS Q.2)

    Let be a binary min-heap consisting of elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in ?

    Binary Heaps and Priority Queues

  9. GATE CS 2020NAT2 marksMedium (estimate)

    GATE CS 2020, Q.57 (CS Q.47)

    Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _______.

    Binary Heaps and Priority Queues

  10. GATE CS 2019MCQ2 marksMedium (estimate)

    GATE CS 2019, Q.50 (CS Q.40)

    Consider the following statements: I. The smallest element in a max-heap is always at a leaf node II. The second largest element in a max-heap is always a child of the root node...

    Binary Heaps and Priority Queues

  11. GATE CS 2018NAT2 marksMedium (estimate)

    GATE CS 2018, Q.56 (CS Q.46)

    The number of possible min-heaps containing each value from exactly once is _____.

    Binary Heaps and Priority Queues

  12. GATE CS 2016 Set 1MCQ2 marksMedium (estimate)

    GATE CS 2016 Set 1, Q.47 (CS Q.37)

    An operator delete(i) for a binary heap data structure is to be designed to delete the item in the -th node. Assume that the heap is implemented in an array and refers...

    Binary Heaps and Priority Queues

  13. GATE CS 2016 Set 2NAT2 marksMedium (estimate)

    GATE CS 2016 Set 2, Q.44 (CS Q.34)

    A complete binary min-heap is made by including each integer in exactly once. The depth of a node in the heap is the length of the path from the root of the heap to...

    Binary Heaps and Priority Queues

  14. GATE CS 2015 Set 1MCQ2 marksEasy (estimate)

    GATE CS 2015 Set 1, Q.42 (CS Q.32)

    Consider a max heap, represented by the array: | Array Index | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---...

    Binary Heaps and Priority Queues

  15. GATE CS 2015 Set 2MCQ1 markMedium (estimate)

    GATE CS 2015 Set 2, Q.27 (CS Q.17)

    Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is

    Binary Heaps and Priority Queues

  16. GATE CS 2015 Set 3MCQ1 markMedium (estimate)

    GATE CS 2015 Set 3, Q.29 (CS Q.19)

    Consider the following array of elements The minimum number of interchanges needed to convert it into a max-he...

    Binary Heaps and Priority Queues

  17. GATE CS 2014 Set 2MCQ1 markEasy (estimate)

    GATE CS 2014 Set 2, Q.22 (CS Q.12)

    A priority queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is: 10, 8, 5, 3, 2. Two new elements 1 and 7 are inserted into...

    Binary Heaps and Priority Queues

Other topics of Data Structures