Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
13. Mai 2006
thanks for helping
aoup it actualy dont work right...
but when i cal my method 2 times after itself, like :
BinTree.BuildHeap;
BinTree.BuildHeap;
it makes a good heap
Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
12. Mai 2006
so ok, i have this code :
procedure TBinTree.BuildHeap;
begin
if not(Left=nil) then
begin
if Left.Value>Value then
begin
Exchange(Left,Self);
Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
1. Mai 2006
you are 17? nice:)
hmm. your alghoritm is nice, but cause of random(100) it wont produce a heap (child can have higher value then parent)
but ok, lets say i have a binar tree and will rebuild it to a heap, what then?
Forum: Object-Pascal / Delphi-Language
Delphi
by sk.Silvia,
1. Mai 2006
hi there i would like to know how to build a heap and heapsort without using an array (i found many alghortims, but they are all using array representation of heap)
thanks:)