You are to start by building the first heap using the standard construction. This method is based on using "upheap" to swap each newly inserted item into its correct position. The current element is highlighted in red. If you choose, you may click on the current element's parent to have those items swap places. When you feel the highlighted element is properly placed, click on the "done processing item" button to continue. When you are done building the entire heap, you may click on the "validate" button to verify its correctness.
You are to build the second heap using the bottom-up heap construction which is based on using "downheap" to swap each highlighted item into the correct position in the subtree rooted at that item. The current element is highlighted in red. If you choose, you may click on either of the current element's children to have the items swap places. When you feel the highlighted element is properly placed, click on the "done processing item" button to continue. When you are done building the entire heap, you may click on the "validate" button to verify its correctness.
If you constructed both heaps properly, you may wish to observe the following: