以下 MIN_HEAPIFY 算法是否正确?
MIN_HEAPIFY(A,i)
{
l=LEFT(i);//calculates the left childs location
r=RIGHT(i);//right childs location
if((l<=A.heap_size)AND(A[l]<A[i]))
small=l;
else
small=i;
if((r<=A.heapsize)&&(A[small]>A[r]))
small=r;
if(small!=i)
{
exchange A[i] with A[small];
MIN_HEAPIFY(A,i)
}
}