数据结构与算法(C#实现)系列---AVLTree(一)[4]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 heavenkiller 的 blog

         }

         //调整高度

         protected void adjustheight(){   this.height=math.max( ((avltree)this.left).height, ((avltree)this.right).height)+1;     }

         //平衡时的四种旋转方式

         protected void llrotation()

         {

              if( this.isempty() )

                   throw new exception("my:invalid operation!");

              avltree avlb=new avltree(this.key);

                            avlb.attachsubtree(1,(avltree)this[0][1]);

本文关键:数据结构,算法,C#,.Net
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top