Median split trees: search


procedure search( key : typekey; t : tree ); begin if t=nil then {*** Not Found *** } notfound( key ) else if t^.OwnerKey = key then {*** Found *** } found( t ^ ) else if t^.SplitKey < key then search( key, t^.right ) else search( key, t^.left ) end;

Pascal source (3416.search.p)



© Addison-Wesley Publishing Co. Inc.