OK, this is the question:

My answers are below...but I think I got confused on part b using bottom up percolateDown()...if anyone could quickly double check, I would greatly appreciate it.a.Show the result of inserting 10, 12, 1, 14, 6, 5, 8, 15, 3, 9, 7, 4, 11, 13, 2, one at a time into an inittially empty binary heap.

b. Show the result of using the linear-time algorithm to build a binary heap using the same input.

a. 1 3 2 6 7 5 4 15 14 12 9 10 11 13 8

b. 1 3 2 12 6 4 8 15 14 9 7 5 11 13 10