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
______ ____ ____ ________ ________ _________ ______ ___ ________ ______ _____ ________.
______ ______ __________ ______ _______.
___ ___ _________ _____ _______ _____ ____ ____.
_____ ____ _________ ________ _______ ________ ______ __________ ____ ________.
_____ _______ ___ ______ _______ __________ ______ ________ ________ _________ _______.
___ _____ ______ _______ _________.
__________ _____ ____ ______ __________ ___ __________.
____ ___ _________ _____ ______ __________ ___ ________ ______ _______.
______ ______ _________ ______ ___ _______ _________ ________ _____ ________ ____.
__________ ____ _________ _____ _______ _______ __________ __________ ___ ______ _______ ________.
___ _______ ___ _____ ________ ______.
_________ ______ _________ __________ _______ ________ __________ ______ _______ __________ ________ __________.
_________ ______ _______ __________ _______ ________.
_______ __________ ___ _______ _________ ___ ____ ______.
_______ ________ ___ _______ ___ ______ ___.
__________ ______ _____ ________ ____ ____ __________ ___ ____ _____ ____ _______.
_____ ____ ____ ____ ________ _________ ______ __________ _______.
_________ ____ __________ _______ ______ ____ ___.
_________ ________ ________ __________ _____ ____ _______ _____ ___.
__________ ____ __________ ______ _______ ____ ______ _________ ______.
__________ _________ _______ _________ _______ _____ ___ __________ __________.
___ ______ ___ _______ ____.
__________ _____ ___ __________ ______ _______ ____ _____ ____ ________ _________ __________.
_____ __________ ___ _____ ___ __________ _______ _______ ______ _______ ________.
____ ________ ____ ______ ____ ____ _________ __________ _______.
___ _______ _____ __________ _________ _________ ______ ______ ______ ______ ___ _________.
_______ ____ ____ ________ __________.
__________ ______ ___ __________ ________ _________ _______ _____ _________ ___ _________ ____.
____ ____ _________ ___ __________ ______ _____ ____ _______ ______ ______.
____ ___ _________ ______ _______ _____ _________ ________ ______.
__________ _____ _________ _____ ____ _____.
___ ____ _____ ________ ________ ___ _______ ___ _________ _______.
______ _____ _________ ______ __________ __________ ________ _____ ____ ________ ____.
_____ ________ ___ _____ __________ ______ _________ ___ _________ _________ __________ ______.
_______ ______ _________ __________ _______ _____ _______ _______ _________ ______ _______ _________.
__________ __________ ___ _____ _____ _________ __________.
____ ___ ________ _____ _________ __________ _____ _______ ___.
______ __________ ___ __________ ________ ___ _______.
_____ _______ _________ ___ ______ _________ _______ __________.
______ _______ ____ ____ _______ ______ ________.
___ _______ __________.
Skip in 10
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, 15, 13, 46, 87, 68]`
______ _______ ________ ____ _________ _____ ________ ______ _________ ____.______ ____ ____ ________ ________ _________ ______ ___ ________ ______ _____ ________.
______ ______ __________ ______ _______.
___ ___ _________ _____ _______ _____ ____ ____.
_____ ____ _________ ________ _______ ________ ______ __________ ____ ________.
_____ _______ ___ ______ _______ __________ ______ ________ ________ _________ _______.
___ _____ ______ _______ _________.
__________ _____ ____ ______ __________ ___ __________.
____ ___ _________ _____ ______ __________ ___ ________ ______ _______.
______ ______ _________ ______ ___ _______ _________ ________ _____ ________ ____.
__________ ____ _________ _____ _______ _______ __________ __________ ___ ______ _______ ________.
___ _______ ___ _____ ________ ______.
_________ ______ _________ __________ _______ ________ __________ ______ _______ __________ ________ __________.
_________ ______ _______ __________ _______ ________.
_______ __________ ___ _______ _________ ___ ____ ______.
_______ ________ ___ _______ ___ ______ ___.
__________ ______ _____ ________ ____ ____ __________ ___ ____ _____ ____ _______.
_____ ____ ____ ____ ________ _________ ______ __________ _______.
_________ ____ __________ _______ ______ ____ ___.
_________ ________ ________ __________ _____ ____ _______ _____ ___.
__________ ____ __________ ______ _______ ____ ______ _________ ______.
__________ _________ _______ _________ _______ _____ ___ __________ __________.
___ ______ ___ _______ ____.
__________ _____ ___ __________ ______ _______ ____ _____ ____ ________ _________ __________.
_____ __________ ___ _____ ___ __________ _______ _______ ______ _______ ________.
____ ________ ____ ______ ____ ____ _________ __________ _______.
___ _______ _____ __________ _________ _________ ______ ______ ______ ______ ___ _________.
_______ ____ ____ ________ __________.
__________ ______ ___ __________ ________ _________ _______ _____ _________ ___ _________ ____.
____ ____ _________ ___ __________ ______ _____ ____ _______ ______ ______.
____ ___ _________ ______ _______ _____ _________ ________ ______.
__________ _____ _________ _____ ____ _____.
___ ____ _____ ________ ________ ___ _______ ___ _________ _______.
______ _____ _________ ______ __________ __________ ________ _____ ____ ________ ____.
_____ ________ ___ _____ __________ ______ _________ ___ _________ _________ __________ ______.
_______ ______ _________ __________ _______ _____ _______ _______ _________ ______ _______ _________.
__________ __________ ___ _____ _____ _________ __________.
____ ___ ________ _____ _________ __________ _____ _______ ___.
______ __________ ___ __________ ________ ___ _______.
_____ _______ _________ ___ ______ _________ _______ __________.
______ _______ ____ ____ _______ ______ ________.
___ _______ __________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.