数据结构与算法(C#实现)系列---二叉堆(数组实现)[5]

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

本文简介:选择自 heavenkiller 的 blog

                   this.array[i-1]=this.array[i/2-1];

                   i/=2;

              }

              this.array[i-1]=_obj;

         }

 

         public object findmin()

         {

              // todo:  添加 binaryheap.findmin 实现

              if( this.array.count==0 )

                   throw new exception("my:priority queue is empty");//如果队列是空的,则抛出异常

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

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

go top