Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#12

Re: Thats Insane - wrong memory setting by recursion???

  Alt 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
  Mit Zitat antworten Zitat