To show why Build-Max-Heap works correctly, we use the following loop invariant: At the start of each iteration of the for loop of lines 2– 3, each node i + 1,i ...
確定! 回上一頁