Skip to content

Commit 2f28835

Browse files
Merge pull request #14 from justcoding121/master
Beta
2 parents 04737f0 + fad1989 commit 2f28835

File tree

217 files changed

+9253
-9097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+9253
-9097
lines changed

.build/build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Task Document -depends Build {
109109
git config --global user.email $env:github_email
110110
git config --global user.name "buildbot121"
111111
git add . -A
112-
git commit -m "Maintanance commit by build server"
112+
git commit -m "API documentation update by build server"
113113
git push origin master
114114

115115
#move cd back to current location

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,7 @@ FakesAssemblies/
202202
*.plg
203203

204204
# Visual Studio 6 workspace options file
205-
*.opt
205+
*.opt
206+
207+
# Docfx
208+
docs/manifest.json

Advanced.Algorithms.Tests/BitAlgorithms/GCD_Tests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public class GCD_Tests
1414
[TestMethod]
1515
public void GCD_Smoke_Test()
1616
{
17-
Assert.AreEqual(3, GCD.Find(-9, 3));
18-
Assert.AreEqual(15, GCD.Find(45, 30));
17+
Assert.AreEqual(3, Gcd.Find(-9, 3));
18+
Assert.AreEqual(15, Gcd.Find(45, 30));
1919

20-
Assert.AreEqual(1, GCD.Find(3, 5));
20+
Assert.AreEqual(1, Gcd.Find(3, 5));
2121

2222
}
2323
}

Advanced.Algorithms.Tests/BitAlgorithms/IsMultipleOfNine_Tests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
namespace Advanced.Algorithms.Tests.BitAlgorithms
1010
{
11-
/// <summary>
12-
/// Problem details below
13-
/// http://www.geeksforgeeks.org/divisibility-9-using-bitwise-operators/
14-
/// </summary>
11+
1512
[TestClass]
1613
public class IsMultipleOfNine_Tests
1714
{

Advanced.Algorithms.Tests/BitAlgorithms/IsMultipleOfThree_Tests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
namespace Advanced.Algorithms.Tests.BitAlgorithms
1010
{
11-
/// <summary>
12-
/// Problem details below
13-
/// http://www.geeksforgeeks.org/write-an-efficient-method-to-check-if-a-number-is-multiple-of-3/
14-
/// </summary>
11+
1512
[TestClass]
1613
public class IsMultipleOfThree_Tests
1714
{

Advanced.Algorithms.Tests/BitAlgorithms/NextPowOfTwo_Tests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
namespace Advanced.Algorithms.Tests.BitAlgorithms
1010
{
11-
/// <summary>
12-
/// Problem details below
13-
/// http://www.geeksforgeeks.org/smallest-power-of-2-greater-than-or-equal-to-n/
14-
/// </summary>
11+
1512
[TestClass]
1613
public class NextPowOfTwo_Tests
1714
{

Advanced.Algorithms.Tests/DataStructures/Dictionary/Dictionary_Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Dictionary_Tests
1414
[TestMethod]
1515
public void Dictionary_SeparateChaining_Test()
1616
{
17-
var Dictionary = new AsDictionary<int, int>(DictionaryType.SeparateChaining);
17+
var Dictionary = new Dictionary<int, int>(DictionaryType.SeparateChaining);
1818
int nodeCount = 1000 * 10;
1919
//insert test
2020

@@ -60,7 +60,7 @@ public void Dictionary_SeparateChaining_Test()
6060
[TestMethod]
6161
public void Dictionary_OpenAddressing_Test()
6262
{
63-
var Dictionary = new AsDictionary<int, int>(DictionaryType.OpenAddressing);
63+
var Dictionary = new Dictionary<int, int>(DictionaryType.OpenAddressing);
6464
int nodeCount = 1000 * 10;
6565
//insert test
6666

Advanced.Algorithms.Tests/DataStructures/Dictionary/TreeDictionary_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class TreeDictionary_Tests
1414
[TestMethod]
1515
public void TreeDictionary_Test()
1616
{
17-
var Dictionary = new AsTreeDictionary<int, int>();
17+
var Dictionary = new TreeDictionary<int, int>();
1818

1919
int nodeCount = 1000;
2020
//insert test

Advanced.Algorithms.Tests/DataStructures/HashSet/HashSet_Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class HashSet_Tests
1414
[TestMethod]
1515
public void HashSet_SeparateChaining_Test()
1616
{
17-
var HashSet = new AsHashSet<int>(HashSetType.SeparateChaining);
17+
var HashSet = new HashSet<int>(HashSetType.SeparateChaining);
1818
int nodeCount = 1000 * 10;
1919
//insert test
2020

@@ -60,7 +60,7 @@ public void HashSet_SeparateChaining_Test()
6060
[TestMethod]
6161
public void HashSet_OpenAddressing_Test()
6262
{
63-
var HashSet = new AsHashSet<int>(HashSetType.OpenAddressing);
63+
var HashSet = new HashSet<int>(HashSetType.OpenAddressing);
6464
int nodeCount = 1000 * 10;
6565
//insert test
6666

Advanced.Algorithms.Tests/DataStructures/Heap/Min/D-aryMinHeap_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AsD_aryMinTree_Tests
1414
/// A tree test
1515
/// </summary>
1616
[TestMethod]
17-
public void AsD_aryHeap_Test()
17+
public void D_aryHeap_Test()
1818
{
1919
var rnd = new Random();
2020
var initial = Enumerable.Range(0, 51).OrderBy(x => rnd.Next()).ToList();

Advanced.Algorithms.Tests/DataStructures/Queues/Queue_Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Queue_Tests
1111
[TestMethod]
1212
public void ArrayQueue_Test()
1313
{
14-
var Queue = new AsQueue<string>();
14+
var Queue = new Queue<string>();
1515

1616
Queue.Enqueue("a");
1717
Queue.Enqueue("b");
@@ -39,7 +39,7 @@ public void ArrayQueue_Test()
3939
[TestMethod]
4040
public void LinkedListQueue_Test()
4141
{
42-
var Queue = new AsQueue<string>(QueueType.LinkedList);
42+
var Queue = new Queue<string>(QueueType.LinkedList);
4343

4444
Queue.Enqueue("a");
4545
Queue.Enqueue("b");

Advanced.Algorithms.Tests/DataStructures/Stack_Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Stack_Tests
1010
[TestMethod]
1111
public void ArrayStack_Test()
1212
{
13-
var stack = new AsStack<string>();
13+
var stack = new Stack<string>();
1414

1515
stack.Push("a");
1616
stack.Push("b");
@@ -35,7 +35,7 @@ public void ArrayStack_Test()
3535
[TestMethod]
3636
public void LinkedListStack_Test()
3737
{
38-
var stack = new AsStack<string>(StackType.LinkedList);
38+
var stack = new Stack<string>(StackType.LinkedList);
3939

4040
stack.Push("a");
4141
stack.Push("b");

Advanced.Algorithms.Tests/DataStructures/Tree/AVLTree_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Advanced.Algorithms.Tests.DataStructures
88
{
99
[TestClass]
10-
public class AVLTree_Tests
10+
public class AvlTreeTests
1111
{
1212
/// <summary>
1313
/// Smoke test

Advanced.Algorithms.Tests/DataStructures/Tree/B+Tree_Tests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class BPTree_Tests
1515
public void BPTree_Smoke_Test()
1616
{
1717
//insert test
18-
var tree = new BPTree<int>(3);
18+
var tree = new BpTree<int>(3);
1919

2020
tree.Insert(5);
2121
tree.Insert(3);
@@ -89,7 +89,7 @@ public void BPTree_AccuracyTest()
8989
.ToList();
9090

9191
var order = 5;
92-
var tree = new BPTree<int>(order);
92+
var tree = new BpTree<int>(order);
9393

9494
for (int i = 0; i < nodeCount; i++)
9595
{
@@ -165,7 +165,7 @@ public void BPTree_StressTest()
165165
.OrderBy(x => rnd.Next())
166166
.ToList();
167167

168-
var tree = new BPTree<int>(12);
168+
var tree = new BpTree<int>(12);
169169

170170
for (int i = 0; i < nodeCount; i++)
171171
{

Advanced.Algorithms.Tests/DataStructures/Tree/BST_Tests.cs

+13-13
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,40 @@ public void BST_Test()
1717
{
1818
//insert test
1919
var tree = new BST<int>();
20-
Assert.AreEqual(tree.GetHeight(), -1);
20+
Assert.AreEqual(tree.getHeight(), -1);
2121

2222
tree.Insert(11);
23-
Assert.AreEqual(tree.GetHeight(), 0);
23+
Assert.AreEqual(tree.getHeight(), 0);
2424

2525
tree.Insert(6);
26-
Assert.AreEqual(tree.GetHeight(), 1);
26+
Assert.AreEqual(tree.getHeight(), 1);
2727

2828
tree.Insert(8);
29-
Assert.AreEqual(tree.GetHeight(), 2);
29+
Assert.AreEqual(tree.getHeight(), 2);
3030

3131
tree.Insert(19);
32-
Assert.AreEqual(tree.GetHeight(), 2);
32+
Assert.AreEqual(tree.getHeight(), 2);
3333

3434
tree.Insert(4);
35-
Assert.AreEqual(tree.GetHeight(), 2);
35+
Assert.AreEqual(tree.getHeight(), 2);
3636

3737
tree.Insert(10);
38-
Assert.AreEqual(tree.GetHeight(), 3);
38+
Assert.AreEqual(tree.getHeight(), 3);
3939

4040
tree.Insert(5);
41-
Assert.AreEqual(tree.GetHeight(), 3);
41+
Assert.AreEqual(tree.getHeight(), 3);
4242

4343
tree.Insert(17);
44-
Assert.AreEqual(tree.GetHeight(), 3);
44+
Assert.AreEqual(tree.getHeight(), 3);
4545

4646
tree.Insert(43);
47-
Assert.AreEqual(tree.GetHeight(), 3);
47+
Assert.AreEqual(tree.getHeight(), 3);
4848

4949
tree.Insert(49);
50-
Assert.AreEqual(tree.GetHeight(), 3);
50+
Assert.AreEqual(tree.getHeight(), 3);
5151

5252
tree.Insert(31);
53-
Assert.AreEqual(tree.GetHeight(), 3);
53+
Assert.AreEqual(tree.getHeight(), 3);
5454

5555
//delete
5656
tree.Delete(43);
@@ -65,7 +65,7 @@ public void BST_Test()
6565
tree.Delete(49);
6666
tree.Delete(31);
6767

68-
Assert.AreEqual(tree.GetHeight(), -1);
68+
Assert.AreEqual(tree.getHeight(), -1);
6969
Assert.AreEqual(tree.Count, 0);
7070

7171
tree.Insert(31);

Advanced.Algorithms.Tests/DataStructures/Tree/FenwickTree_Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class AsFenwickTreeTests
1111
/// Smoke test
1212
/// </summary>
1313
[TestMethod]
14-
public void AsFenwickTree_Sum_Smoke_Test()
14+
public void FenwickTree_Sum_Smoke_Test()
1515
{
1616
var testArray = new int[] { 1, 3, 5, 7, 9, 11 };
1717

Advanced.Algorithms.Tests/DataStructures/Tree/RangeTreeTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class RangeTreeTests
1010
/// Smoke test
1111
/// </summary>
1212
[TestMethod]
13-
public void AsRangeTree1D_Smoke_Test()
13+
public void RangeTree1D_Smoke_Test()
1414
{
1515
var tree = new DRangeTree<int>(1);
1616

@@ -46,7 +46,7 @@ public void AsRangeTree1D_Smoke_Test()
4646
}
4747

4848
[TestMethod]
49-
public void AsRangeTree2D_Smoke_Test()
49+
public void RangeTree2D_Smoke_Test()
5050
{
5151
var tree = new DRangeTree<int>(2);
5252

Advanced.Algorithms.Tests/DataStructures/Tree/SegmentTree_Tests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
namespace Advanced.Algorithms.Tests.DataStructures.Tree
66
{
77
[TestClass]
8-
public class AsSegmentTreeTests
8+
public class SegmentTreeTests
99
{
1010
/// <summary>
1111
/// Smoke test
1212
/// </summary>
1313
[TestMethod]
14-
public void AsSegmentTree_Sum_Smoke_Test()
14+
public void SegmentTree_Sum_Smoke_Test()
1515
{
1616
var testArray = new int[] { 1, 3, 5, 7, 9, 11 };
1717

Advanced.Algorithms.Tests/Geometry/ClosestPointPair_Tests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
namespace Advanced.Algorithms.Tests.Geometry
1010
{
11-
/// <summary>
12-
/// Problem details below
13-
/// http://www.geeksforgeeks.org/closest-pair-of-points/
14-
/// </summary>
11+
1512
[TestClass]
1613
public class ClosestPointPair_Tests
1714
{

Advanced.Algorithms.Tests/Geometry/PointInsidePolygon_Tests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
namespace Advanced.Algorithms.Tests.Geometry
1010
{
11-
/// <summary>
12-
/// Problem details below
13-
/// http://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/
14-
/// </summary>
11+
1512
[TestClass]
1613
public class PointInsidePolygon_Tests
1714
{

Advanced.Algorithms.Tests/Geometry/RectangleIntersection_Tests.cs

+11-14
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
namespace Advanced.Algorithms.Tests.Geometry
1010
{
11-
/// <summary>
12-
/// Problem details below
13-
/// http://www.geeksforgeeks.org/find-two-rectangles-overlap/
14-
/// </summary>
11+
1512
[TestClass]
1613
public class RectangleIntersection_Tests
1714
{
@@ -20,30 +17,30 @@ public void RectIntersection_Smoke_Test()
2017
{
2118
var result = RectangleIntersection.FindIntersection(new Rectangle()
2219
{
23-
leftTopCorner = new Point() { x = 0, y = 10 },
24-
rightBottomCorner = new Point() { x = 10, y = 0 }
20+
LeftTopCorner = new Point() { x = 0, y = 10 },
21+
RightBottomCorner = new Point() { x = 10, y = 0 }
2522
},
2623
new Rectangle()
2724
{
28-
leftTopCorner = new Point() { x = 5, y = 5 },
29-
rightBottomCorner = new Point() { x = 15, y = 0 }
25+
LeftTopCorner = new Point() { x = 5, y = 5 },
26+
RightBottomCorner = new Point() { x = 15, y = 0 }
3027
});
3128

3229
Assert.AreEqual(result, new Rectangle()
3330
{
34-
leftTopCorner = new Point() { x = 5, y = 5 },
35-
rightBottomCorner = new Point() { x = 10, y = 0 }
31+
LeftTopCorner = new Point() { x = 5, y = 5 },
32+
RightBottomCorner = new Point() { x = 10, y = 0 }
3633
});
3734

3835
result = RectangleIntersection.FindIntersection(new Rectangle()
3936
{
40-
leftTopCorner = new Point() { x = 0, y = 10 },
41-
rightBottomCorner = new Point() { x = 4, y = 0 }
37+
LeftTopCorner = new Point() { x = 0, y = 10 },
38+
RightBottomCorner = new Point() { x = 4, y = 0 }
4239
},
4340
new Rectangle()
4441
{
45-
leftTopCorner = new Point() { x = 5, y = 5 },
46-
rightBottomCorner = new Point() { x = 15, y = 0 }
42+
LeftTopCorner = new Point() { x = 5, y = 5 },
43+
RightBottomCorner = new Point() { x = 15, y = 0 }
4744
});
4845

4946
Assert.AreEqual(result, default(Rectangle));

Advanced.Algorithms.Tests/Search/SearchAlmostSorted_Tests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
namespace Advanced.Algorithms.Tests.Search
55
{
6-
/// <summary>
7-
/// Problem statement below
8-
/// http://www.geeksforgeeks.org/search-almost-sorted-array/
9-
/// </summary>
6+
107
[TestClass]
118
public class SearchAlmostSorted_Tests
129
{

0 commit comments

Comments
 (0)