阅读背景:

计算HeapSort在c#中的比较个数

来源:互联网 

I would like to know how I can count the number of the comparisons made by the HeapSort I got on rosettacode? I tried to count it by adding a variable and each time the comparison method gets called this variable gets incremented. But somehow I dont get the right results. I think I have to override the comparison method somehow and use a getter and setter to increment a count variable. A hint will be highly appreciated...I would like to know how I can count the number




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: