Engineering & Science
GATE Computer Science
GATE Computer Science Heaps practice questions and solutions
5 questions on Heaps, part of Trees in the GATE CS Data Structures syllabus. Every question has a worked solution and an explanation of why each wrong option fails. Open a question to attempt it and see the answer.
- Questions
- 5 questions
- Easy
- 3 easy
- Medium
- 2 medium
Questions
- 1What is the worst-case time to build a binary heap from an unsorted array of n elements using the bottom-up (…Medium
- 2What is the minimum number of elements in a binary heap of height h (a single node has height 0)?Easy
- 3A binary heap is stored in an array A[1..n] with the root at A[1]. At which index is the left child of the no…Easy
- 4What is the worst-case time to delete the maximum element from a binary max-heap of n elements?Easy
- 5The max-heap [50, 30, 40, 10, 20, 35, 25] is stored in an array with the root at index 1. After inserting 45…Medium