1. (a) Construct the max-heap for the following list of values using the Insert algorithm. Illustrate, step by step, the
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1. (a) Construct the max-heap for the following list of values using the Insert algorithm. Illustrate, step by step, the
1. (a) Construct the max-heap for the following list of values using the Insert algorithm. Illustrate, step by step, the tree changes as the max-heap is constructed from the input values. [7, 3, 4, 20, 10, 1] (10 marks) (b) Trace the steps of applying a D&C max-min algorithm to find the maximum and minimum elements of [7, 3, 4, 20, 9, 8, 13, 2] Illustrate the difference using a non-D&C max-min algorithm using the same example. (10 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!