heaps fig just before phase ii fig after swapping first and last values if sortedthe would go at the end of the list since there are elements in the heapwe'll swap the and the by doing this is at its final position within sorted list the is not in the correct location within the heap sowe call the __siftdownfromto method to sift the down from the position within the heap to at most the size- location the __siftdownfromto method does its work and swaps the with the bigger of the two childrenthe the does not need to sift down any further since it is bigger than the so we have the view of the heap in fig after the first pass of phase ii the second pass of phase ii swaps the and the moving the to its final location in the sorted list it then sifts the down to its rightful location within the heapproducing the picture you see in fig this copy belongs to 'acha