Skip to content

Commit 1ac59a3

Browse files
committed
Fix 3.2.47
1 parent 00bcc79 commit 1ac59a3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

3 Searching/3.2/3.2.47/Form1.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
43
using System.Threading.Tasks;
54
using System.Windows.Forms;
65
using BinarySearchTree;
@@ -81,7 +80,7 @@ private int Test(int n)
8180
bst.Put(d, d);
8281
}
8382

84-
return bst.AverageInternalPathLength() + 1;
83+
return bst.AverageInternalPathLength();
8584
}
8685

8786
private int[] GetRandomInt(int n)

3 Searching/3.2/3.2.47/Form2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void Draw(Dictionary<int, double> data)
1717
{
1818
var panel = CreateGraphics();
1919
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));
2121

2222
for (var i = data.Keys.Min(); i < data.Keys.Max(); i++)
2323
{

0 commit comments

Comments
 (0)