Question
Show the minimum heap after each of the following operations
i) Create with values 13, 46, 68, 15, 87, 4, 33, 21, 1, 79.
ii) Insertion of value 9.
iii) Update of value 1 by 71.
Answer :
Word Count : 472
i) Create a minimum heap with values 13, 46, 68, 15, 87, 4, 33, 21, 1, 79 We start by inserting elements one by one into the min-heap and adjust to maintain the heap property (parent ≤ children). Step 1: Insert 13 → `[13]` Step 2: Insert 46 → `[13, 46]` (no swap needed) Step 3: Insert 68 → `[13, 46, 68]` (no swap needed) Step 4: Insert 15 → `[13, 15, 68, 46]` (15 swaps with 46) Step 5: Insert 87 → `[13, 15, 68, 46, 87]` Step 6: Insert 4 → `[4, _____ ____ ____ _______ __________ ____ __________ __________ _______ ________.
___ ____ ______ _____ _____ ____ ___ __________ _____.
___ _________ ______ ________ __________ _____ _____ __________ ___.
____ _____ _____ _______ ________ __________ ________.
______ ____ ______ __________ __________ ________ ______.
__________ ________ _______ __________ ________ ______ ____ __________ _________.
________ ___ _____ __________ ____ ___ _____ ______.
_________ ________ __________ _________ ______ __________ _______.
__________ __________ __________ _______ ________ ____ _____ ______ ____.
________ _____ ____ ___ _________ ________ ___ _______ ___ ______.
________ ____ _________ _____ _______ ________ ______ _____ _________ ________ ___ ____.
____ ____ ____ ________ ___.
___ _______ _______ _______ ______ ________ _________ _______ ________.
_____ _______ __________ _____ __________ ______ ________ _________ ________ ____.
___ ____ _______ _________ __________ __________ _________ ______ _______ _____ ______ _____.
________ _____ __________ _________ ___ _______.
_____ ____ ___ ____ ___ ___ __________ _________.
____ _______ _______ _____ ___ ______ ___ ____.
__________ __________ ____ __________ ______ ____ _____ _________ __________ _______.
_________ _____ ____ ___ ________ ___ ________ _________ __________ __________.
_______ ______ ______ ___ __________ ____ _______ ____.
___ __________ ___ _________ ________.
______ _________ _________ _____ ____ ________ ______.
_________ __________ _____ ________ ________ _________ ___ ___.
_____ ___ ________ ___ ______ ____ ________ _________ ________ _____ _________.
_______ _________ ______ ______ ___ ____ _____ ________ ___ _____.
_______ ______ _________ ____ _______ ____ _____ ______.
___ ________ _______ ____ ____.
______ ______ ____ ___ ___.
__________ _________ _____ ______ ___ ________ __________ _________ ______.
_______ _________ __________ _______ _______.
___ ______ ________ _____ _________ ________ ______.
__________ ___ ___ ___ ____ ______ __________ _______ _______ ________ _______.
____ _________ ___ ________ ____ ______ ____ ______ __________ ___ ____ ____.
_____ _______ _________ _____ ________ _______.
__________ _______ ___ ______ ____ ___ ________ _______ ____ ________ ______.
__________ _________ ________ _________ _____ ________ ____ __________.
_____ __________ _____ _____ __________ __________ ___ ____ ______.
_____ _______ ____ _________ ___ ______ _______.
_______ _________ ______ __________ ____ ________ ______ ______ ______ ________ _________ _______.
_________ ____ __________ ________ _____ ____ ___ ____ _____ __________ _______ ______.
___ ____ ___ ________ _____ ____ ___.
_________ ___ _______ _________ ______ __________ _____.
____ ______ _______ __________ ____ _________.
______ ________ _______ ______ ____ _______ ____.
Get Full Answer on WhatsApp
i) Create a minimum heap with values 13, 46, 68, 15, 87, 4, 33, 21, 1, 79 We start by inserting elements one by one into the min-heap and adjust to maintain the heap property (parent ≤ children). Step 1: Insert 13 → `[13]` Step 2: Insert 46 → `[13, 46]` (no swap needed) Step 3: Insert 68 → `[13, 46, 68]` (no swap needed) Step 4: Insert 15 → `[13, 15, 68, 46]` (15 swaps with 46) Step 5: Insert 87 → `[13, 15, 68, 46, 87]` Step 6: Insert 4 → `[4, _____ ____ ____ _______ __________ ____ __________ __________ _______ ________.
___ ____ ______ _____ _____ ____ ___ __________ _____.
___ _________ ______ ________ __________ _____ _____ __________ ___.
____ _____ _____ _______ ________ __________ ________.
______ ____ ______ __________ __________ ________ ______.
__________ ________ _______ __________ ________ ______ ____ __________ _________.
________ ___ _____ __________ ____ ___ _____ ______.
_________ ________ __________ _________ ______ __________ _______.
__________ __________ __________ _______ ________ ____ _____ ______ ____.
________ _____ ____ ___ _________ ________ ___ _______ ___ ______.
________ ____ _________ _____ _______ ________ ______ _____ _________ ________ ___ ____.
____ ____ ____ ________ ___.
___ _______ _______ _______ ______ ________ _________ _______ ________.
_____ _______ __________ _____ __________ ______ ________ _________ ________ ____.
___ ____ _______ _________ __________ __________ _________ ______ _______ _____ ______ _____.
________ _____ __________ _________ ___ _______.
_____ ____ ___ ____ ___ ___ __________ _________.
____ _______ _______ _____ ___ ______ ___ ____.
__________ __________ ____ __________ ______ ____ _____ _________ __________ _______.
_________ _____ ____ ___ ________ ___ ________ _________ __________ __________.
_______ ______ ______ ___ __________ ____ _______ ____.
___ __________ ___ _________ ________.
______ _________ _________ _____ ____ ________ ______.
_________ __________ _____ ________ ________ _________ ___ ___.
_____ ___ ________ ___ ______ ____ ________ _________ ________ _____ _________.
_______ _________ ______ ______ ___ ____ _____ ________ ___ _____.
_______ ______ _________ ____ _______ ____ _____ ______.
___ ________ _______ ____ ____.
______ ______ ____ ___ ___.
__________ _________ _____ ______ ___ ________ __________ _________ ______.
_______ _________ __________ _______ _______.
___ ______ ________ _____ _________ ________ ______.
__________ ___ ___ ___ ____ ______ __________ _______ _______ ________ _______.
____ _________ ___ ________ ____ ______ ____ ______ __________ ___ ____ ____.
_____ _______ _________ _____ ________ _______.
__________ _______ ___ ______ ____ ___ ________ _______ ____ ________ ______.
__________ _________ ________ _________ _____ ________ ____ __________.
_____ __________ _____ _____ __________ __________ ___ ____ ______.
_____ _______ ____ _________ ___ ______ _______.
_______ _________ ______ __________ ____ ________ ______ ______ ______ ________ _________ _______.
_________ ____ __________ ________ _____ ____ ___ ____ _____ __________ _______ ______.
___ ____ ___ ________ _____ ____ ___.
_________ ___ _______ _________ ______ __________ _____.
____ ______ _______ __________ ____ _________.
______ ________ _______ ______ ____ _______ ____.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★