Skip to content

Commit

Permalink
Fix 3.2.47
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesnowy committed Jan 29, 2020
1 parent 00bcc79 commit 1ac59a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions 3 Searching/3.2/3.2.47/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using BinarySearchTree;
Expand Down Expand Up @@ -81,7 +80,7 @@ private int Test(int n)
bst.Put(d, d);
}

return bst.AverageInternalPathLength() + 1;
return bst.AverageInternalPathLength();
}

private int[] GetRandomInt(int n)
Expand Down
2 changes: 1 addition & 1 deletion 3 Searching/3.2/3.2.47/Form2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void Draw(Dictionary<int, double> data)
{
var panel = CreateGraphics();
var unitX = (float)ClientRectangle.Width / data.Count;
var unitY = (float)(ClientRectangle.Height / data.Values.Max());
var unitY = (float)(ClientRectangle.Height / (1.39 * Math.Log2(data.Keys.Max()) - 1.85));

for (var i = data.Keys.Min(); i < data.Keys.Max(); i++)
{
Expand Down

0 comments on commit 1ac59a3

Please sign in to comment.