|
Algorithm 5 INSERT procedure for min-heap [13] |
-
Input:
, auxiliary data
-
Output:
None
-
1:
{Insert the new item as the last leaf node}
-
2:
-
3:
-
4:
-
5:
whiledo {Perform upheap to restore the heap order}
-
6:
if
then
-
7:
-
8:
-
9:
else
-
10:
break
-
11:
end if
-
12:
end while
|