Question: Question 2: Consider the construction and use of a minimum binary heap. Show a data sequence containing duplicate values that will show why heap sort
Question 2:

Consider the construction and use of a minimum binary heap. Show a data sequence containing duplicate values that will show why heap sort is unstable. This means find a data value sequence that will build a heap such that when the min values are taken out, the duplicate values come out in a different order than they went into the heap. The sequence does not have to be long, it just has to have at least 2 duplicate values. To distinguish the duplicates use something like subscripts or dot notation... i.e., if we have two 8 values, make one of them 8.a and the other 8.b. Show your input sequence, the construction of the original heap, and the removal of min items enough to show the duplicates coming out in reverse order. Show proper delMin behavior
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
