https://github.com/kansiris/c-sharp-algorithms
C-Sharp-Algorithms
https://github.com/kansiris/c-sharp-algorithms
Last synced: 8 months ago
JSON representation
C-Sharp-Algorithms
- Host: GitHub
- URL: https://github.com/kansiris/c-sharp-algorithms
- Owner: kansiris
- License: mit
- Created: 2019-08-27T04:16:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-27T04:17:47.000Z (almost 7 years ago)
- Last Synced: 2025-05-31T22:06:05.497Z (about 1 year ago)
- Language: C#
- Size: 1.15 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# C# ALGORITHMS [](https://travis-ci.org/aalhour/C-Sharp-Algorithms)
A C# plug-and-play class-library project of standard Data Structures and Algorithms. It contains 35+ Data Structures and 30+ Algorithms designed as Object-Oriented isolated components. Even though this project started for educational purposes, the implemented Data Structures and Algorithms are standard, efficient, stable and tested.
## DESCRIPTION
This project originally started out as an interview preparation project. However, after receiving a great amount of positive responses on [reddit](https://redd.it/3etf9f), and noticing excitement from a few [GitHubers](https://github.com/aalhour/C-Sharp-Algorithms/graphs/contributors) to contribute furthermore to it, the project took on a different meaning. So, I decided to keep maintaining it as a reference for data structures and algorithm implementations in C# as well as my own research side-project under these topics.
#### Solution Hierarchy:
This is a C#.NET solution-project, and it contains three subprojects:
1. [Algorithms](Algorithms): A class library project. Contains the Algorithms implementations.
2. [Data Structures](DataStructures): A class library project. Contains the Data Structures implementations.
3. [UnitTest](UnitTest): Unit-testing project for the Algorithms and Data Structures.
#### Requirements:
1. .NET Core >= 2.0
2. XUnit
#### A Note to Contributors:
If you wish to contribute to C# ALGORITHMS, then please make sure you check out the [Contribution Guidelines](CONTRIBUTING.md) first.
Note: The projects where tested with Visual Studio Community using .NET Core 2.0.3 on OSX 10.
## DATA STRUCTURES
#### Lists:
* [Skip List](DataStructures/Lists/SkipList.cs).
* [Array List](DataStructures/Lists/ArrayList.cs).
* [Stack](DataStructures/Lists/Stack.cs).
* [Queue](DataStructures/Lists/Queue.cs).
* [Single-Linked List](DataStructures/Lists/SLinkedList.cs).
* [Double-Linked List](DataStructures/Lists/DLinkedList.cs).
#### Heaps:
* [Binary-Min Heap](DataStructures/Heaps/BinaryMinHeap.cs).
* [Binary-Max Heap](DataStructures/Heaps/BinaryMaxHeap.cs).
* [Binomial-Min Heap](DataStructures/Heaps/BinomialMinHeap.cs).
#### Priority Queues:
* [Min-Priority Queue](DataStructures/Heaps/MinPriorityQueue.cs).
* [Keyed Priority Queue](DataStructures/Heaps/KeyedPriorityQueue.cs).
#### Hashing Functions:
* [Prime Hashing Family](DataStructures/Hashing/PrimeHashingFamily.cs).
* [Universal Hashing Family](DataStructures/Hashing/UniversalHashingFamily.cs).
#### Hash Tables:
* [Chained Hash Table](DataStructures/Dictionaries/ChainedHashTable.cs).
* [Cuckoo Hash Table](DataStructures/Dictionaries/CuckooHashTable.cs).
* [Open-Addressing Hash Table](DataStructures/Dictionaries/OpenAddressingHashTable.cs).
#### Sorted Collections (Tree-based):
* [Sorted List](DataStructures/SortedCollections/SortedList.cs).
* [Sorted Dictionary](DataStructures/SortedCollections/SortedDictionary.cs).
#### Trees:
* [Trie](DataStructures/Trees/Trie.cs).
* [Trie Map](DataStructures/Trees/TrieMap.cs).
* [AVL Tree](DataStructures/Trees/AVLTree.cs).
* [Red-Black Tree](DataStructures/Trees/RedBlackTree.cs).
* [Map version](DataStructures/Trees/RedBlackTreeMap.cs). Supports key-value pairs nodes; indexes nodes by keys.
* [Binary Search Tree](DataStructures/Trees/BinarySearchTree.cs).
* [Map version](DataStructures/Trees/BinarySearchTreeMap.cs). Supports key-value pairs nodes; indexes nodes by keys.
* [Augmented Binary Search Tree](DataStructures/Trees/AugmentedBinarySearchTree.cs).
#### Graphs:
* Undirected Graphs:
+ [Clique Graphs](DataStructures/Graphs/CliqueGraph.cs).
+ [Undirected Sparse Graph](DataStructures/Graphs/UndirectedSparseGraph.cs).
+ [Undirected Dense Graph](DataStructures/Graphs/UndirectedDenseGraph.cs).
* Undirected Weighted Graphs:
+ [Undirected Weighted Sparse Graph](DataStructures/Graphs/UndirectedWeightedSparseGraph.cs).
+ [Undirected Weighted Dense Graph](DataStructures/Graphs/UndirectedWeightedDenseGraph.cs).
* Directed Graphs:
+ [Directed Sparse Graph](DataStructures/Graphs/DirectedSparseGraph.cs).
+ [Directed Dense Graph](DataStructures/Graphs/DirectedDenseGraph.cs).
* Directed Weighted Graphs:
+ [Directed Weighted Sparse Graph](DataStructures/Graphs/DirectedWeightedSparseGraph.cs).
+ [Directed Weighted Dense Graph](DataStructures/Graphs/DirectedWeightedDenseGraph.cs).
## ALGORITHMS
#### Sorting:
* [Bubble Sort](Algorithms/Sorting/BubbleSorter.cs).
* [Bucket Sort](Algorithms/Sorting/BucketSorter.cs).
* [BST Sort](Algorithms/Sorting/BinarySearchTreeSorter.cs).
* [Comb Sort](Algorithms/Sorting/CombSorter.cs).
* [Counting Sort](Algorithms/Sorting/CountingSorter.cs).
* [Cycle Sort](Algorithms/Sorting/CycleSorter.cs).
* [Gnome Sort](Algorithms/Sorting/GnomeSorter.cs).
* [Heap Sort](Algorithms/Sorting/HeapSorter.cs).
* [Insertion Sort](Algorithms/Sorting/InsertionSorter.cs).
* [LSD Radix Sort](Algorithms/Sorting/LSDRadixSorter.cs).
* [Merge Sort](Algorithms/Sorting/MergeSorter.cs).
* [Selection Sort](Algorithms/Sorting/SelectionSorter.cs).
* [Shell Sort](Algorithms/Sorting/ShellSorter.cs).
* [OddEven Sort](Algorithms/Sorting/OddEvenSorter.cs).
* [PigeonHole Sort](Algorithms/Sorting/PigeonHoleSorter.cs).
* [Quick Sort](Algorithms/Sorting/QuickSorter.cs).
#### Graphs:
* Graph Search:
+ [Depth-First Searcher](Algorithms/Graphs/DepthFirstSearcher.cs).
+ [Breadth-First Searcher](Algorithms/Graphs/BreadthFirstSearcher.cs).
* Shortest Paths:
+ [Breadth-First SPs](Algorithms/Graphs/BreadthFirstShortestPaths.cs).
+ [Bellman-Ford SPs](Algorithms/Graphs/BellmanFordShortestPaths.cs).
+ [Dijkstra SPs](Algorithms/Graphs/DijkstraShortestPaths.cs).
+ [Dijkstra All-Pairs SPs](Algorithms/Graphs/DijkstraAllPairsShortestPaths.cs).
* DFS Applications:
+ [Cycles Detector](Algorithms/Graphs/CyclesDetector.cs).
+ [Topological Sorter](Algorithms/Graphs/TopologicalSorter.cs).
* BFS Applications:
+ [Connected Components](Algorithms/Graphs/ConnectedComponents.cs).
+ [Bipartite Graphs Coloring](Algorithms/Graphs/BipartiteColoring.cs).
#### Trees:
* [Recursive Binary Tree Walker](Algorithms/Trees/BinaryTreeRecursiveWalker.cs).
+ Methods: PrintAll, ForEach, Contains and BinarySearch. Traversal Modes: Preorder, Inorder & Postorder.
#### Strings:
* [Permutations and Anagrams](Algorithms/Strings/Permutations.cs).
* [Edit Distance](Algorithms/Strings/EditDistance.cs).
+ Uses a generic custom class for passing costs: [EditDistanceCostsMap\](Algorithms/Strings/EditDistanceCostsMap.cs).
#### Numeric:
* [Catalan Numbers](Algorithms/Numeric/CatalanNumbers.cs).
* [Greatest Common Divisor](Algorithms/Numeric/GreatestCommonDivisor.cs)
#### Visualization:
* [Tree Drawer](DataStructures/Trees/TreeDrawer.cs).
## CONTRIBUTORS
* [Edgar Carballo Domínguez](https://github.com/karv).
* [Lucas Lemaire](https://github.com/ZwoRmi).
* [Samuel Kenney](https://github.com/samuelkenney).
* [Ivandro Ismael Gomes Jao](https://github.com/ivandrofly)
## LICENSE
This project is licensed under the [MIT License](LICENSE).