Registriert seit: 6. Apr 2005
10.109 Beiträge
|
Re: Thats Insane - wrong memory setting by recursion???
20. Apr 2006, 22:53
Hi Silvia,
you might want to try out this:
Delphi-Quellcode:
uses
Math;
function TBinTree.FindMin: Integer;
var
minLeft, minRight: Integer;
begin
if Assigned(left)
then minLeft := left.FindMin
else minLeft := value;
if Assigned(right)
then minRight := right.FindMin
else minRight := value;
Result := MinIntValue(value, minLeft, minRight);
end;
Kind regards
marabu
|