Anonymous user
Priority queue: Difference between revisions
m
→{{header|VBScript}}
Line 6,977:
if size>ubound(q) then redim preserve q(ubound(q)*1.1)
q(size)=x
if size=1 then q(0)=x 'ugly!!▼
sift_up
end sub
Line 6,990 ⟶ 6,989:
h=size
p=h\2
swap h,p
h=p
p=h\2
if p=0 then exit sub
wend
end sub
end sub
Line 7,058 ⟶ 7,060:
5 Make tea
</pre>
=={{header|Wren}}==
{{libheader|Wren-queue}}
|