File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
- using System . Linq ;
4
3
using System . Threading . Tasks ;
5
4
using System . Windows . Forms ;
6
5
using BinarySearchTree ;
@@ -81,7 +80,7 @@ private int Test(int n)
81
80
bst . Put ( d , d ) ;
82
81
}
83
82
84
- return bst . AverageInternalPathLength ( ) + 1 ;
83
+ return bst . AverageInternalPathLength ( ) ;
85
84
}
86
85
87
86
private int [ ] GetRandomInt ( int n )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public void Draw(Dictionary<int, double> data)
17
17
{
18
18
var panel = CreateGraphics ( ) ;
19
19
var unitX = ( float ) ClientRectangle . Width / data . Count ;
20
- var unitY = ( float ) ( ClientRectangle . Height / data . Values . Max ( ) ) ;
20
+ var unitY = ( float ) ( ClientRectangle . Height / ( 1.39 * Math . Log2 ( data . Keys . Max ( ) ) - 1.85 ) ) ;
21
21
22
22
for ( var i = data . Keys . Min ( ) ; i < data . Keys . Max ( ) ; i ++ )
23
23
{
You can’t perform that action at this time.
0 commit comments