Next algorithm


Single right rotation


procedure rrot( var t : tree ); var temp : tree; begin temp := t; t := t^.left; temp^.left := t^.right; t^.right := temp; end;

Pascal source (3418.rrot.p)



© Addison-Wesley Publishing Co. Inc.