GATE 2022: Data Structure and Programming Quiz-8
Attempt now to get your rank among 363 students!
Question 1
Question 2
89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100
Minimum _____ number of interchanges are needed to convert it into a max-heap.
Question 3
Question 4
Question 5
5, 12, 3, 15, 4, 6, 10
These elements are inserted into max heap tree using two different methods. In method 1, elements are inserted one by one into heap and heap property is maintained at every step. In method 2, first these elements are stored into an almost complete binary tree and then max-heapify function is executed on it. Now find the number of elements that has different index position into two heaps generated from given two methods _________.
Question 6
30, 16, 18, 35, 50, 10, 20, 23, 15
Find the number of swaps done to convert the almost complete binary tree into max heap _________.
- 363 attempts
- 1 upvote
- 3 comments