Question
Download Solution PDFThe elements 42, 25, 30, 40, 22, 35, 26 are inserted one by one in the given order into a max heap. The resultant max-heap is stored in an array implementation as
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFConcepts:
After inserting each element, we will apply MAX-Heapify operation to get the MAX-Heap.
Insert: 42, 25 and 30
Insert: 40 apply MAX-Heapify
New order: 42, 40, 30, 25, 22
Insert: 35 apply MAX-Heapify
New order: 42, 40, 35, 25, 22, 30 and 26
Diagram: resultant MAX_Heap
Last updated on Jul 7, 2025
-> The UGC NET Answer Key 2025 June was released on the official website ugcnet.nta.ac.in on 06th July 2025.
-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.
-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.
-> The exam is conducted bi-annually - in June and December cycles.
-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions.
-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.