@@ -10,129 +10,145 @@ This project originally started out as an interview preparation project. However
10
10
11
11
This is a C#.NET solution-project, and it contains three subprojects:
12
12
13
- 1 . [ Algorithms] ( Algorithms ) : A class library project. Contains the Algorithms implementations.
14
- 2 . [ Data Structures] ( DataStructures ) : A class library project. Contains the Data Structures implementations.
15
- 3 . [ UnitTest] ( UnitTest ) : Unit-testing project for the Algorithms and Data Structures.
13
+ 1 . [ Algorithms] ( Algorithms ) : A class library project. Contains the Algorithms implementations
14
+ 2 . [ Data Structures] ( DataStructures ) : A class library project. Contains the Data Structures implementations
15
+ 3 . [ UnitTest] ( UnitTest ) : Unit-testing project for the Algorithms and Data Structures
16
16
17
17
#### Requirements:
18
+
18
19
1 . .NET Core >= 2.0
19
20
2 . XUnit
20
21
21
22
#### A Note to Contributors:
23
+
22
24
If you wish to contribute to C# ALGORITHMS, then please make sure you check out the [ Contribution Guidelines] ( CONTRIBUTING.md ) first.
23
25
24
- Note: The projects where tested with Visual Studio Community using .NET Core 2.0.3 on OSX 10 .
26
+ Note: The projects where tested with Visual Studio Community using .NET Core 2.0.3 on mac OS .
25
27
26
28
27
29
## DATA STRUCTURES
28
30
29
31
#### Lists:
30
- * [ Skip List] ( DataStructures/Lists/SkipList.cs ) .
31
- * [ Array List] ( DataStructures/Lists/ArrayList.cs ) .
32
- * [ Stack] ( DataStructures/Lists/Stack.cs ) .
33
- * [ Queue] ( DataStructures/Lists/Queue.cs ) .
34
- * [ Single-Linked List] ( DataStructures/Lists/SLinkedList.cs ) .
35
- * [ Double-Linked List] ( DataStructures/Lists/DLinkedList.cs ) .
32
+
33
+ * [ Skip List] ( DataStructures/Lists/SkipList.cs )
34
+ * [ Array List] ( DataStructures/Lists/ArrayList.cs )
35
+ * [ Stack] ( DataStructures/Lists/Stack.cs )
36
+ * [ Queue] ( DataStructures/Lists/Queue.cs )
37
+ * [ Single-Linked List] ( DataStructures/Lists/SLinkedList.cs )
38
+ * [ Double-Linked List] ( DataStructures/Lists/DLinkedList.cs )
36
39
37
40
#### Heaps:
38
- * [ Binary-Min Heap] ( DataStructures/Heaps/BinaryMinHeap.cs ) .
39
- * [ Binary-Max Heap] ( DataStructures/Heaps/BinaryMaxHeap.cs ) .
40
- * [ Binomial-Min Heap] ( DataStructures/Heaps/BinomialMinHeap.cs ) .
41
+
42
+ * [ Binary-Min Heap] ( DataStructures/Heaps/BinaryMinHeap.cs )
43
+ * [ Binary-Max Heap] ( DataStructures/Heaps/BinaryMaxHeap.cs )
44
+ * [ Binomial-Min Heap] ( DataStructures/Heaps/BinomialMinHeap.cs )
41
45
42
46
#### Priority Queues:
43
- * [ Min-Priority Queue] ( DataStructures/Heaps/MinPriorityQueue.cs ) .
44
- * [ Keyed Priority Queue] ( DataStructures/Heaps/KeyedPriorityQueue.cs ) .
47
+
48
+ * [ Min-Priority Queue] ( DataStructures/Heaps/MinPriorityQueue.cs )
49
+ * [ Keyed Priority Queue] ( DataStructures/Heaps/KeyedPriorityQueue.cs )
45
50
46
51
#### Hashing Functions:
47
- * [ Prime Hashing Family] ( DataStructures/Hashing/PrimeHashingFamily.cs ) .
48
- * [ Universal Hashing Family] ( DataStructures/Hashing/UniversalHashingFamily.cs ) .
52
+
53
+ * [ Prime Hashing Family] ( DataStructures/Hashing/PrimeHashingFamily.cs )
54
+ * [ Universal Hashing Family] ( DataStructures/Hashing/UniversalHashingFamily.cs )
49
55
50
56
#### Hash Tables:
51
- * [ Chained Hash Table] ( DataStructures/Dictionaries/ChainedHashTable.cs ) .
52
- * [ Cuckoo Hash Table] ( DataStructures/Dictionaries/CuckooHashTable.cs ) .
53
- * [ Open-Addressing Hash Table] ( DataStructures/Dictionaries/OpenAddressingHashTable.cs ) .
57
+
58
+ * [ Chained Hash Table] ( DataStructures/Dictionaries/ChainedHashTable.cs )
59
+ * [ Cuckoo Hash Table] ( DataStructures/Dictionaries/CuckooHashTable.cs )
60
+ * [ Open-Addressing Hash Table] ( DataStructures/Dictionaries/OpenAddressingHashTable.cs )
54
61
55
62
#### Sorted Collections (Tree-based):
56
- * [ Sorted List] ( DataStructures/SortedCollections/SortedList.cs ) .
57
- * [ Sorted Dictionary] ( DataStructures/SortedCollections/SortedDictionary.cs ) .
63
+
64
+ * [ Sorted List] ( DataStructures/SortedCollections/SortedList.cs )
65
+ * [ Sorted Dictionary] ( DataStructures/SortedCollections/SortedDictionary.cs )
58
66
59
67
#### Trees:
60
- * [ Trie] ( DataStructures/Trees/Trie.cs ) .
61
- * [ Trie Map] ( DataStructures/Trees/TrieMap.cs ) .
62
- * [ AVL Tree] ( DataStructures/Trees/AVLTree.cs ) .
63
- * [ Red-Black Tree] ( DataStructures/Trees/RedBlackTree.cs ) .
64
- * [ Map version] ( DataStructures/Trees/RedBlackTreeMap.cs ) . Supports key-value pairs nodes; indexes nodes by keys.
65
- * [ Binary Search Tree] ( DataStructures/Trees/BinarySearchTree.cs ) .
66
- * [ Map version] ( DataStructures/Trees/BinarySearchTreeMap.cs ) . Supports key-value pairs nodes; indexes nodes by keys.
67
- * [ Augmented Binary Search Tree] ( DataStructures/Trees/AugmentedBinarySearchTree.cs ) .
68
+
69
+ * [ Trie] ( DataStructures/Trees/Trie.cs )
70
+ * [ Trie Map] ( DataStructures/Trees/TrieMap.cs )
71
+ * [ AVL Tree] ( DataStructures/Trees/AVLTree.cs )
72
+ * [ Red-Black Tree] ( DataStructures/Trees/RedBlackTree.cs )
73
+ * [ Map version] ( DataStructures/Trees/RedBlackTreeMap.cs ) _ (supports key-value pairs nodes; indexes nodes by keys)_
74
+ * [ Binary Search Tree] ( DataStructures/Trees/BinarySearchTree.cs )
75
+ * [ Map version] ( DataStructures/Trees/BinarySearchTreeMap.cs ) _ (supports key-value pairs nodes; indexes nodes by keys)_
76
+ * [ Augmented Binary Search Tree] ( DataStructures/Trees/AugmentedBinarySearchTree.cs )
68
77
69
78
#### Graphs:
79
+
70
80
* Undirected Graphs:
71
- + [ Clique Graphs] ( DataStructures/Graphs/CliqueGraph.cs ) .
72
- + [ Undirected Sparse Graph] ( DataStructures/Graphs/UndirectedSparseGraph.cs ) .
73
- + [ Undirected Dense Graph] ( DataStructures/Graphs/UndirectedDenseGraph.cs ) .
81
+ + [ Clique Graphs] ( DataStructures/Graphs/CliqueGraph.cs )
82
+ + [ Undirected Sparse Graph] ( DataStructures/Graphs/UndirectedSparseGraph.cs )
83
+ + [ Undirected Dense Graph] ( DataStructures/Graphs/UndirectedDenseGraph.cs )
74
84
* Undirected Weighted Graphs:
75
- + [ Undirected Weighted Sparse Graph] ( DataStructures/Graphs/UndirectedWeightedSparseGraph.cs ) .
76
- + [ Undirected Weighted Dense Graph] ( DataStructures/Graphs/UndirectedWeightedDenseGraph.cs ) .
85
+ + [ Undirected Weighted Sparse Graph] ( DataStructures/Graphs/UndirectedWeightedSparseGraph.cs )
86
+ + [ Undirected Weighted Dense Graph] ( DataStructures/Graphs/UndirectedWeightedDenseGraph.cs )
77
87
* Directed Graphs:
78
- + [ Directed Sparse Graph] ( DataStructures/Graphs/DirectedSparseGraph.cs ) .
79
- + [ Directed Dense Graph] ( DataStructures/Graphs/DirectedDenseGraph.cs ) .
88
+ + [ Directed Sparse Graph] ( DataStructures/Graphs/DirectedSparseGraph.cs )
89
+ + [ Directed Dense Graph] ( DataStructures/Graphs/DirectedDenseGraph.cs )
80
90
* Directed Weighted Graphs:
81
- + [ Directed Weighted Sparse Graph] ( DataStructures/Graphs/DirectedWeightedSparseGraph.cs ) .
82
- + [ Directed Weighted Dense Graph] ( DataStructures/Graphs/DirectedWeightedDenseGraph.cs ) .
91
+ + [ Directed Weighted Sparse Graph] ( DataStructures/Graphs/DirectedWeightedSparseGraph.cs )
92
+ + [ Directed Weighted Dense Graph] ( DataStructures/Graphs/DirectedWeightedDenseGraph.cs )
83
93
84
94
85
95
## ALGORITHMS
86
96
87
97
#### Sorting:
88
- * [ Bubble Sort] ( Algorithms/Sorting/BubbleSorter.cs ) .
89
- * [ Bucket Sort] ( Algorithms/Sorting/BucketSorter.cs ) .
90
- * [ BST Sort] ( Algorithms/Sorting/BinarySearchTreeSorter.cs ) .
91
- * [ Comb Sort] ( Algorithms/Sorting/CombSorter.cs ) .
92
- * [ Counting Sort] ( Algorithms/Sorting/CountingSorter.cs ) .
93
- * [ Cycle Sort] ( Algorithms/Sorting/CycleSorter.cs ) .
94
- * [ Gnome Sort] ( Algorithms/Sorting/GnomeSorter.cs ) .
95
- * [ Heap Sort] ( Algorithms/Sorting/HeapSorter.cs ) .
96
- * [ Insertion Sort] ( Algorithms/Sorting/InsertionSorter.cs ) .
97
- * [ LSD Radix Sort] ( Algorithms/Sorting/LSDRadixSorter.cs ) .
98
- * [ Merge Sort] ( Algorithms/Sorting/MergeSorter.cs ) .
99
- * [ Selection Sort] ( Algorithms/Sorting/SelectionSorter.cs ) .
100
- * [ Shell Sort] ( Algorithms/Sorting/ShellSorter.cs ) .
101
- * [ OddEven Sort] ( Algorithms/Sorting/OddEvenSorter.cs ) .
102
- * [ PigeonHole Sort] ( Algorithms/Sorting/PigeonHoleSorter.cs ) .
103
- * [ Quick Sort] ( Algorithms/Sorting/QuickSorter.cs ) .
98
+
99
+ * [ Bubble Sort] ( Algorithms/Sorting/BubbleSorter.cs )
100
+ * [ Bucket Sort] ( Algorithms/Sorting/BucketSorter.cs )
101
+ * [ BST Sort] ( Algorithms/Sorting/BinarySearchTreeSorter.cs )
102
+ * [ Comb Sort] ( Algorithms/Sorting/CombSorter.cs )
103
+ * [ Counting Sort] ( Algorithms/Sorting/CountingSorter.cs )
104
+ * [ Cycle Sort] ( Algorithms/Sorting/CycleSorter.cs )
105
+ * [ Gnome Sort] ( Algorithms/Sorting/GnomeSorter.cs )
106
+ * [ Heap Sort] ( Algorithms/Sorting/HeapSorter.cs )
107
+ * [ Insertion Sort] ( Algorithms/Sorting/InsertionSorter.cs )
108
+ * [ LSD Radix Sort] ( Algorithms/Sorting/LSDRadixSorter.cs )
109
+ * [ Merge Sort] ( Algorithms/Sorting/MergeSorter.cs )
110
+ * [ Selection Sort] ( Algorithms/Sorting/SelectionSorter.cs )
111
+ * [ Shell Sort] ( Algorithms/Sorting/ShellSorter.cs )
112
+ * [ OddEven Sort] ( Algorithms/Sorting/OddEvenSorter.cs )
113
+ * [ PigeonHole Sort] ( Algorithms/Sorting/PigeonHoleSorter.cs )
114
+ * [ Quick Sort] ( Algorithms/Sorting/QuickSorter.cs )
104
115
105
116
#### Graphs:
117
+
106
118
* Graph Search:
107
- + [ Depth-First Searcher] ( Algorithms/Graphs/DepthFirstSearcher.cs ) .
108
- + [ Breadth-First Searcher] ( Algorithms/Graphs/BreadthFirstSearcher.cs ) .
119
+ + [ Depth-First Searcher] ( Algorithms/Graphs/DepthFirstSearcher.cs )
120
+ + [ Breadth-First Searcher] ( Algorithms/Graphs/BreadthFirstSearcher.cs )
109
121
* Shortest Paths:
110
- + [ Breadth-First SPs] ( Algorithms/Graphs/BreadthFirstShortestPaths.cs ) .
111
- + [ Bellman-Ford SPs] ( Algorithms/Graphs/BellmanFordShortestPaths.cs ) .
112
- + [ Dijkstra SPs] ( Algorithms/Graphs/DijkstraShortestPaths.cs ) .
113
- + [ Dijkstra All-Pairs SPs] ( Algorithms/Graphs/DijkstraAllPairsShortestPaths.cs ) .
122
+ + [ Breadth-First SPs] ( Algorithms/Graphs/BreadthFirstShortestPaths.cs )
123
+ + [ Bellman-Ford SPs] ( Algorithms/Graphs/BellmanFordShortestPaths.cs )
124
+ + [ Dijkstra SPs] ( Algorithms/Graphs/DijkstraShortestPaths.cs )
125
+ + [ Dijkstra All-Pairs SPs] ( Algorithms/Graphs/DijkstraAllPairsShortestPaths.cs )
114
126
* DFS Applications:
115
- + [ Cycles Detector] ( Algorithms/Graphs/CyclesDetector.cs ) .
116
- + [ Topological Sorter] ( Algorithms/Graphs/TopologicalSorter.cs ) .
127
+ + [ Cycles Detector] ( Algorithms/Graphs/CyclesDetector.cs )
128
+ + [ Topological Sorter] ( Algorithms/Graphs/TopologicalSorter.cs )
117
129
* BFS Applications:
118
- + [ Connected Components] ( Algorithms/Graphs/ConnectedComponents.cs ) .
119
- + [ Bipartite Graphs Coloring] ( Algorithms/Graphs/BipartiteColoring.cs ) .
130
+ + [ Connected Components] ( Algorithms/Graphs/ConnectedComponents.cs )
131
+ + [ Bipartite Graphs Coloring] ( Algorithms/Graphs/BipartiteColoring.cs )
120
132
121
133
#### Trees:
122
- * [ Recursive Binary Tree Walker] ( Algorithms/Trees/BinaryTreeRecursiveWalker.cs ) .
123
- + Methods: PrintAll, ForEach, Contains and BinarySearch. Traversal Modes: Preorder, Inorder & Postorder.
134
+
135
+ * [ Recursive Binary Tree Walker] ( Algorithms/Trees/BinaryTreeRecursiveWalker.cs )
136
+ + Methods: PrintAll, ForEach, Contains and BinarySearch. Traversal Modes: Preorder, Inorder & Postorder
124
137
125
138
#### Strings:
126
- * [ Permutations and Anagrams] ( Algorithms/Strings/Permutations.cs ) .
127
- * [ Edit Distance] ( Algorithms/Strings/EditDistance.cs ) .
128
- + Uses a generic custom class for passing costs: [ EditDistanceCostsMap\< T\> ] ( Algorithms/Strings/EditDistanceCostsMap.cs ) .
139
+
140
+ * [ Permutations and Anagrams] ( Algorithms/Strings/Permutations.cs )
141
+ * [ Edit Distance] ( Algorithms/Strings/EditDistance.cs )
142
+ + Uses a generic custom class for passing costs: [ EditDistanceCostsMap\< T\> ] ( Algorithms/Strings/EditDistanceCostsMap.cs )
129
143
130
144
#### Numeric:
131
- * [ Catalan Numbers] ( Algorithms/Numeric/CatalanNumbers.cs ) .
145
+
146
+ * [ Catalan Numbers] ( Algorithms/Numeric/CatalanNumbers.cs )
132
147
* [ Greatest Common Divisor] ( Algorithms/Numeric/GreatestCommonDivisor.cs )
133
148
134
149
#### Visualization:
135
- * [ Tree Drawer] ( DataStructures/Trees/TreeDrawer.cs ) .
150
+
151
+ * [ Tree Drawer] ( DataStructures/Trees/TreeDrawer.cs )
136
152
137
153
138
154
## CONTRIBUTORS
@@ -145,4 +161,5 @@ Note: The projects where tested with Visual Studio Community using .NET Core 2.0
145
161
<!-- Made with [contributors-img](https://contributors-img.firebaseapp.com). -->
146
162
147
163
## LICENSE
164
+
148
165
This project is licensed under the [ MIT License] ( LICENSE ) .
0 commit comments