{"id":15029719,"url":"https://github.com/aalhour/c-sharp-algorithms","last_synced_at":"2025-05-14T07:07:42.826Z","repository":{"id":32037271,"uuid":"35608694","full_name":"aalhour/C-Sharp-Algorithms","owner":"aalhour","description":":books: :chart_with_upwards_trend: Plug-and-play class-library project of standard Data Structures and Algorithms in C#","archived":false,"fork":false,"pushed_at":"2024-12-14T23:11:25.000Z","size":3346,"stargazers_count":6037,"open_issues_count":52,"forks_count":1397,"subscribers_count":363,"default_branch":"master","last_synced_at":"2025-04-24T04:13:50.860Z","etag":null,"topics":["algorithms","binary-trees","csharp","data-structures","graph","graph-algorithms","hashing","hashing-algorithms","heaps","queues","searching","searching-algorithms","sorting","sorting-algorithms","tree","tree-algorithms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aalhour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-05-14T11:56:48.000Z","updated_at":"2025-04-23T16:05:24.000Z","dependencies_parsed_at":"2022-07-14T01:00:27.195Z","dependency_job_id":"66e78bd9-e9ed-4ad3-a749-552969a1186e","html_url":"https://github.com/aalhour/C-Sharp-Algorithms","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2FC-Sharp-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2FC-Sharp-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2FC-Sharp-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2FC-Sharp-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aalhour","download_url":"https://codeload.github.com/aalhour/C-Sharp-Algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250560054,"owners_count":21450173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","binary-trees","csharp","data-structures","graph","graph-algorithms","hashing","hashing-algorithms","heaps","queues","searching","searching-algorithms","sorting","sorting-algorithms","tree","tree-algorithms"],"created_at":"2024-09-24T20:11:29.270Z","updated_at":"2025-04-24T04:13:58.083Z","avatar_url":"https://github.com/aalhour.png","language":"C#","readme":"```\n\n                                          o---o    |   |                                 \n                                         /       --O---O--                               \n                                        O          |   |                                 \n                                         \\       --O---O--                               \n                                          o---o    |   |                                 \n\n\n              O    o       o--o    o--o   o---o   o-O-o  o--O--o  o   o  o     o   o--o \n             / \\   |      o       o    o  |   |     |       |     |   |  |\\   /|  |     \n            o---o  |      |  o-o  |    |  O--Oo     |       |     O---O  | \\o/ |   o--o \n            |   |  |      o    |  o    o  |  \\      |       |     |   |  |     |      | \n            o   o  O---o   o--o    o--o   o   \\o  o-O-o     o     o   o  o     o  o---o \n\n```\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\" alt=\"License\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/aalhour/C-Sharp-Algorithms?style=flat-square\u0026color=blue\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/aalhour/C-Sharp-Algorithms\" alt=\"Build\"\u003e\n    \u003cimg src=\"https://img.shields.io/travis/aalhour/C-Sharp-Algorithms?style=flat-square\u0026color=blue\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/aalhour/C-Sharp-Algorithms/graphs/contributors\" alt=\"Contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/aalhour/C-Sharp-Algorithms?style=flat-square\u0026color=blue\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/aalhour/C-Sharp-Algorithms/pulse\" alt=\"Activity\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/commit-activity/m/aalhour/C-Sharp-Algorithms?style=flat-square\u0026color=blue\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n##\n### WHAT IS C# ALGORITHMS?\n\nA plug-and-play class-library project of standard Data Structures and Algorithms, written in C#. It contains **75+** Data Structures and 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.\n\n##\n### BACK STORY\n\nThis 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#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.\n\n##\n### DESCRIPTION\n\n#### Solution Hierarchy:\n\nThis is a C#.NET solution-project, and it contains three subprojects:\n\n  1. [Algorithms](Algorithms): A class library project. Contains the Algorithms implementations\n  2. [Data Structures](DataStructures): A class library project. Contains the Data Structures implementations\n  3. [UnitTest](UnitTest): Unit-testing project for the Algorithms and Data Structures\n\n#### Requirements:\n\n  1. .NET Core \u003e= 2.0\n  2. XUnit\n\n#### A Note to Contributors:\n\nIf you wish to contribute to C# ALGORITHMS, then please make sure you check out the [Contribution Guidelines](.github/CONTRIBUTING.md) first.\n\n##\n### DATA STRUCTURES\n\n#### Linear:\n\n  * [Skip List](DataStructures/Lists/SkipList.cs)\n  * [Array List](DataStructures/Lists/ArrayList.cs)\n  * [Stack](DataStructures/Lists/Stack.cs)\n  * [Queue](DataStructures/Lists/Queue.cs)\n  * [Single-Linked List](DataStructures/Lists/SLinkedList.cs)\n  * [Double-Linked List](DataStructures/Lists/DLinkedList.cs)\n\n#### Circular:\n  \n  * [Circular Buffer](DataStructures/Lists/CircularBuffer.cs)\n\n#### Heaps:\n\n  * [Binary-Min Heap](DataStructures/Heaps/BinaryMinHeap.cs)\n  * [Binary-Max Heap](DataStructures/Heaps/BinaryMaxHeap.cs)\n  * [Binomial-Min Heap](DataStructures/Heaps/BinomialMinHeap.cs)\n \n#### Priority Queues:\n\n  * [Min-Priority Queue](DataStructures/Heaps/MinPriorityQueue.cs)\n  * [Key-value Priority Queue](DataStructures/Heaps/KeyedPriorityQueue.cs)\n \n#### Hashing Functions:\n\n  * [Prime Hashing Family](DataStructures/Hashing/PrimeHashingFamily.cs)\n  * [Universal Hashing Family](DataStructures/Hashing/UniversalHashingFamily.cs)\n\n#### Hash Tables:\n\n  * [Chained Hash Table](DataStructures/Dictionaries/ChainedHashTable.cs)\n  * [Cuckoo Hash Table](DataStructures/Dictionaries/CuckooHashTable.cs)\n  * [Open-Addressing Hash Table](DataStructures/Dictionaries/OpenAddressingHashTable.cs)\n\n#### Sorted Collections (Tree-based):\n\n  * [Sorted List](DataStructures/SortedCollections/SortedList.cs)\n  * [Sorted Dictionary](DataStructures/SortedCollections/SortedDictionary.cs)\n\n#### Trees:\n\n  \n  * Basic Search Trees:\n    + [Binary Search Tree](DataStructures/Trees/BinarySearchTree.cs)\n      * [Map version](DataStructures/Trees/BinarySearchTreeMap.cs) _(supports key-value pairing; nodes indexed by keys)_\n    + [\\(Augmented\\) Binary Search Tree](DataStructures/Trees/AugmentedBinarySearchTree.cs)\n    + [Ternary Search Tree](DataStructures/Trees/TernarySearchTree.cs)  \n  * Self-Balancing Trees:\n    + [AVL Tree](DataStructures/Trees/AVLTree.cs)\n    + [B-Tree](DataStructures/Trees/BTree.cs)\n    + [Red-Black Tree](DataStructures/Trees/RedBlackTree.cs)\n      * [Map version](DataStructures/Trees/RedBlackTreeMap.cs) _(supports key-value pairing; nodes indexed by keys)_\n  * Prefix Trees:\n    + [Trie](DataStructures/Trees/Trie.cs)\n    + [Trie Map](DataStructures/Trees/TrieMap.cs) _(associative prefix tree; complete words are keys to records)_\n \n#### Graphs:\n\n  * Undirected Graphs:\n    + [Clique Graphs](DataStructures/Graphs/CliqueGraph.cs)\n    + [Undirected Sparse Graph](DataStructures/Graphs/UndirectedSparseGraph.cs)\n    + [Undirected Dense Graph](DataStructures/Graphs/UndirectedDenseGraph.cs)\n  * Undirected Weighted Graphs:\n    + [Undirected Weighted Sparse Graph](DataStructures/Graphs/UndirectedWeightedSparseGraph.cs)\n    + [Undirected Weighted Dense Graph](DataStructures/Graphs/UndirectedWeightedDenseGraph.cs)\n  * Directed Graphs:\n    + [Directed Sparse Graph](DataStructures/Graphs/DirectedSparseGraph.cs)\n    + [Directed Dense Graph](DataStructures/Graphs/DirectedDenseGraph.cs)\n  * Directed Weighted Graphs:\n    + [Directed Weighted Sparse Graph](DataStructures/Graphs/DirectedWeightedSparseGraph.cs)\n    + [Directed Weighted Dense Graph](DataStructures/Graphs/DirectedWeightedDenseGraph.cs)\n\n\n##\n### ALGORITHMS\n\n#### Sorting:\n\n  * [Bubble Sort](Algorithms/Sorting/BubbleSorter.cs)\n  * [Bucket Sort](Algorithms/Sorting/BucketSorter.cs)\n  * [BST Sort](Algorithms/Sorting/BinarySearchTreeSorter.cs)\n  * [Comb Sort](Algorithms/Sorting/CombSorter.cs)\n  * [Counting Sort](Algorithms/Sorting/CountingSorter.cs)\n  * [Cycle Sort](Algorithms/Sorting/CycleSorter.cs)\n  * [Gnome Sort](Algorithms/Sorting/GnomeSorter.cs)\n  * [Heap Sort](Algorithms/Sorting/HeapSorter.cs)\n  * [Insertion Sort](Algorithms/Sorting/InsertionSorter.cs)\n  * [LSD Radix Sort](Algorithms/Sorting/LSDRadixSorter.cs)\n  * [Merge Sort](Algorithms/Sorting/MergeSorter.cs)\n  * [Selection Sort](Algorithms/Sorting/SelectionSorter.cs)\n  * [Shell Sort](Algorithms/Sorting/ShellSorter.cs)\n  * [OddEven Sort](Algorithms/Sorting/OddEvenSorter.cs)\n  * [PigeonHole Sort](Algorithms/Sorting/PigeonHoleSorter.cs)\n  * [Quick Sort](Algorithms/Sorting/QuickSorter.cs)\n\n#### Searching:\n\n  * [Binary Search](Algorithms/Search/BinarySearcher.cs)\n\n#### Graphs:\n\n  * Graph Search:\n    + [Depth-First Searcher](Algorithms/Graphs/DepthFirstSearcher.cs)\n    + [Breadth-First Searcher](Algorithms/Graphs/BreadthFirstSearcher.cs)\n  * Shortest Paths:\n    + [Breadth-First SPs](Algorithms/Graphs/BreadthFirstShortestPaths.cs)\n    + [Bellman-Ford SPs](Algorithms/Graphs/BellmanFordShortestPaths.cs)\n    + [Dijkstra SPs](Algorithms/Graphs/DijkstraShortestPaths.cs)\n    + [Dijkstra All-Pairs SPs](Algorithms/Graphs/DijkstraAllPairsShortestPaths.cs)\n  * DFS Applications:\n    + [Cycles Detector](Algorithms/Graphs/CyclesDetector.cs)\n    + [Topological Sorter](Algorithms/Graphs/TopologicalSorter.cs)\n  * BFS Applications:\n    + [Connected Components](Algorithms/Graphs/ConnectedComponents.cs)\n    + [Bipartite Graphs Coloring](Algorithms/Graphs/BipartiteColoring.cs)\n\n#### Trees:\n\n  * [Recursive Binary Tree Walker](Algorithms/Trees/BinaryTreeRecursiveWalker.cs)\n    + Methods: PrintAll, ForEach, Contains and BinarySearch. Traversal Modes: Preorder, Inorder \u0026 Postorder\n\n#### Strings:\n\n  * [Permutations and Anagrams](Algorithms/Strings/Permutations.cs)\n  * [Edit Distance](Algorithms/Strings/EditDistance.cs)\n    + Uses a generic custom class for passing costs: [EditDistanceCostsMap\\\u003cT\\\u003e](Algorithms/Strings/EditDistanceCostsMap.cs)\n\n#### Numeric:\n\n  * [Binomial Coefficients](Algorithms/Numeric/BinomialCoefficients.cs)\n  * [Catalan Numbers](Algorithms/Numeric/CatalanNumbers.cs)\n  * [Greatest Common Divisor](Algorithms/Numeric/GreatestCommonDivisor.cs)\n\n#### Visualization:\n\n  * [Tree Drawer](DataStructures/Trees/TreeDrawer.cs)\n\n\n##\n### CONTRIBUTORS\n\n\u003ca href=\"https://github.com/aalhour/C-Sharp-Algorithms/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.firebaseapp.com/image?repo=aalhour/C-Sharp-Algorithms\" /\u003e\n\u003c/a\u003e\n\n\u003cbr /\u003e\n\u003c!-- Made with [contributors-img](https://contributors-img.firebaseapp.com). --\u003e\n\n##\n### LICENSE\n\nThis project is licensed under the [MIT License](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalhour%2Fc-sharp-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faalhour%2Fc-sharp-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalhour%2Fc-sharp-algorithms/lists"}