# thealgorithms/c-sharp

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/thealgorithms-c-sharp).**

8,049 stars · 1,685 forks · C# · gpl-3.0

## Links

- GitHub: https://github.com/TheAlgorithms/C-Sharp
- awesome-repositories: https://awesome-repositories.com/repository/thealgorithms-c-sharp.md

## Topics

`algorithm` `algorithms` `algorithms-and-data-structures` `c-sharp` `data-structures` `hacktoberfest`

## Description

This project is a collection of reference implementations for algorithms, mathematics, cryptography, compression, and machine learning written in C#. It serves as an educational library providing standard implementations of sorting, searching, and graph theory algorithms.

The repository covers a wide range of computational domains, including combinatorial optimization for constraint satisfaction and scheduling, as well as symmetric and classical cryptographic ciphers. It also provides reference code for lossless data compression techniques and fundamental machine learning primitives such as regression, classification, and neural network activation functions.

Additional capabilities include comprehensive tools for number theory, linear algebra, and numerical calculus. The project also features utilities for graph theory analysis, geospatial coordinate calculations, image processing, and statistical analysis.

## Tags

### Education & Learning Resources

- [Algorithmic Reference Implementations](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/algorithms/general-collections-and-study/algorithmic-reference-implementations.md) — Provides a comprehensive collection of modular C# implementations of standard sorting, searching, and graph algorithms for educational study. ([source](https://cdn.jsdelivr.net/gh/thealgorithms/c-sharp@master/README.md))
- [Algorithm Reference Libraries](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/computer-science-education/algorithm-reference-libraries.md) — Provides a comprehensive collection of standard algorithms and data structures implemented in C# for educational reference.
- [Cryptographic Ciphers](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/algorithms/cryptography-and-coding-theory/cryptographic-ciphers.md) — Provides educational implementations of symmetric keys, block ciphers, and classical encryption algorithms.
- [Machine Learning Fundamentals](https://awesome-repositories.com/f/education-learning-resources/technical-domain-education/ai-machine-learning-education/machine-learning-fundamentals.md) — Provides foundational implementations of regression and classification to demonstrate core machine learning concepts.

### Artificial Intelligence & ML

- [Machine Learning Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning-frameworks.md) — Implements fundamental machine learning frameworks including regression, classification, and recommendation systems. ([source](https://cdn.jsdelivr.net/gh/thealgorithms/c-sharp@master/README.md))
- [Machine Learning Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning-implementations.md) — Provides code-based reference implementations of core machine learning algorithms including regression and classification.
- [Activation Functions](https://awesome-repositories.com/f/artificial-intelligence-ml/convolutional-neural-networks/activation-functions.md) — Provides implementations of non-linear activation functions like Sigmoid, Tanh, ReLU, and SoftMax for neural networks. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Numeric))
- [K-Nearest Neighbor Classifiers](https://awesome-repositories.com/f/artificial-intelligence-ml/k-nearest-neighbor-classifiers.md) — Implements K-Nearest Neighbors for classifying data points based on the similarity of training examples. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/MachineLearning))
- [Logistic Regression Models](https://awesome-repositories.com/f/artificial-intelligence-ml/logistic-regression-models.md) — Implements logistic regression models for binary outcome prediction using sigmoid functions. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/MachineLearning))
- [Linear Regression Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/algorithms/linear-regression-implementations.md) — Provides educational from-scratch implementations of linear regression models for predictive modeling. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/MachineLearning))

### Part of an Awesome List

- [Computational Mathematics Tools](https://awesome-repositories.com/f/awesome-lists/devtools/computational-mathematics-tools.md) — Provides tools for linear algebra, numerical analysis, and number theory to solve quantitative problems.

### Data & Databases

- [Data Compression Algorithms](https://awesome-repositories.com/f/data-databases/data-compression-algorithms.md) — Implements various encoding and compression algorithms to reduce the storage footprint of data. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/))
- [Graph Theory](https://awesome-repositories.com/f/data-databases/graph-computing-systems/graph-theory.md) — Implements standard graph theory algorithms for modeling and solving problems with nodes and edges.
- [Collection Search Utilities](https://awesome-repositories.com/f/data-databases/collection-utilities/collection-search-utilities.md) — Provides linear, binary, and heuristic search algorithms for locating elements within data structures. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Search))
- [Graph Coloring Algorithms](https://awesome-repositories.com/f/data-databases/graph-computing-systems/graph-theory/graph-libraries/graph-coloring-algorithms.md) — Implements graph coloring algorithms to assign labels to vertices such that no two adjacent vertices share the same color. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Problems))
- [Graph Traversal](https://awesome-repositories.com/f/data-databases/graph-traversal.md) — Implements breadth-first and depth-first search strategies to explore reachable vertices in a network. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Graph))

### Scientific & Mathematical Computing

- [Scientific & Mathematical Computing](https://awesome-repositories.com/f/scientific-mathematical-computing.md) — Provides a broad suite of scientific and mathematical computing tools covering linear algebra and numerical analysis. ([source](https://cdn.jsdelivr.net/gh/thealgorithms/c-sharp@master/README.md))
- [C# Mathematical Libraries](https://awesome-repositories.com/f/scientific-mathematical-computing/c-mathematical-libraries.md) — Implements linear algebra, number theory, and numerical analysis specifically using the C# language.
- [Linear Algebra Routines](https://awesome-repositories.com/f/scientific-mathematical-computing/linear-algebra-routines.md) — Implements fundamental linear algebra operations including Gauss-Jordan elimination and pseudoinverse computations. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Numeric))
- [Linear System Solvers](https://awesome-repositories.com/f/scientific-mathematical-computing/linear-system-solvers.md) — Provides direct linear solvers and optimization techniques including Gaussian elimination and Pareto methods. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Other))
- [Differential Equation Solvers](https://awesome-repositories.com/f/scientific-mathematical-computing/differential-equation-solvers.md) — Implements numerical solvers for ordinary differential equations using Euler and Runge Kutta methods. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Numeric))
- [Shannon-Fano Coding](https://awesome-repositories.com/f/scientific-mathematical-computing/entropy-coding-algorithms/shannon-fano-coding.md) — Implements Shannon-Fano coding to reduce data size using variable-length prefixes based on character probabilities. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/DataCompression))
- [Greatest Common Divisor Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/greatest-common-divisor-algorithms.md) — Implements the Euclidean algorithm to find the greatest common divisor and linear combination coefficients. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/ModularArithmetic))
- [Huffman Coding Implementations](https://awesome-repositories.com/f/scientific-mathematical-computing/huffman-coding-implementations.md) — Provides Huffman coding implementations for lossless data compression using frequency-based binary codes. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/DataCompression))
- [Job Sequence Optimizations](https://awesome-repositories.com/f/scientific-mathematical-computing/job-sequence-optimizations.md) — Implements strategies for determining the most efficient order and timing of tasks to minimize cost or completion time. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Problems))
- [Mathematical Sequences](https://awesome-repositories.com/f/scientific-mathematical-computing/mathematical-algorithms/mathematical-sequences.md) — Computes terms for various mathematical sequences, including prime, binomial, and recursive series. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Sequences))
- [Minimum Spanning Tree Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/algorithms/graph-processing/minimum-spanning-tree-algorithms.md) — Implements greedy algorithms to identify the minimum spanning tree in weighted graphs. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Graph))
- [Shortest Path Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/algorithms/graph-processing/shortest-path-algorithms.md) — Calculates the most efficient path that visits a set of locations and returns to the origin. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Problems))
- [Pathfinding Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/algorithms-and-complexity/pathfinding-algorithms.md) — Calculates valid sequences of moves for pieces on a board to reach targets or visit all squares. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Problems))
- [Integer Property Verifiers](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/integer-property-verifiers.md) — Provides tools to check if integers are prime, perfect, narcissistic, or amicable. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Numeric))
- [Chinese Remainder Theorem Solvers](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/modular-congruence-analyzers/chinese-remainder-theorem-solvers.md) — Solves systems of multiple remainder conditions using the Chinese Remainder Theorem. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/ModularArithmetic))
- [Modular Inverse Calculators](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/modular-congruence-analyzers/modular-inverse-calculators.md) — Determines the modular multiplicative inverse for a given integer modulo m. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/ModularArithmetic))
- [Prime Factorization Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/prime-factorization-algorithms.md) — Implements randomized algorithms for decomposing composite numbers into their prime factors. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Other))
- [Prime Generation Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/prime-generation-algorithms.md) — Implements prime number determination using mathematical tests and sieving methods. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Other))
- [Numerical Computing](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/mathematical-libraries-and-utilities/mathematics/numerical-computing.md) — Implements fundamental numerical computing operations including factorials and binomial coefficients. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Numeric))
- [Constraint Solvers](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/optimization-solvers/constraint-solvers.md) — Implements algorithms for finding configurations that satisfy a predefined set of constraints, such as board-game piece placement. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Problems))
- [Transform Coding](https://awesome-repositories.com/f/scientific-mathematical-computing/transform-coding.md) — The project rearranges characters into runs of similar values to improve the efficiency of subsequent compression steps. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/DataCompression))

### Security & Cryptography

- [C# Cryptography Implementations](https://awesome-repositories.com/f/security-cryptography/c-cryptography-implementations.md) — Provides reference code for classical and symmetric encryption algorithms written in C#.
- [Cryptographic Operations](https://awesome-repositories.com/f/security-cryptography/cryptographic-operations.md) — Provides standard cryptographic primitives for encryption, decryption, and authenticity verification. ([source](https://cdn.jsdelivr.net/gh/thealgorithms/c-sharp@master/README.md))
- [Symmetric Cipher Implementations](https://awesome-repositories.com/f/security-cryptography/symmetric-cipher-implementations.md) — Implements symmetric block cipher algorithms, including Blowfish and Feistel networks, to protect data confidentiality. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Encoders))
- [Classical Ciphers](https://awesome-repositories.com/f/security-cryptography/symmetric-encryption/classical-ciphers.md) — Implements historical encryption algorithms such as Caesar, Vigenere, Hill, and Autokey ciphers. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Encoders))

### Development Tools & Productivity

- [Topological Sorting](https://awesome-repositories.com/f/development-tools-productivity/task-dependency-management/topological-sorting.md) — Produces a linear ordering of vertices based on directed dependencies to determine execution sequence. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Graph))

### Software Engineering & Architecture

- [Knapsack Problem Solving](https://awesome-repositories.com/f/software-engineering-architecture/algorithmic-problem-solving/knapsack-problem-solving.md) — Provides solvers for the knapsack problem to determine the most valuable item combination within a weight limit. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Knapsack))
- [Optimization Problem Solvers](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-programming/optimization-problem-solvers.md) — Provides algorithmic solutions for complex optimization problems using dynamic programming and greedy strategies. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Problems))

### User Interface & Experience

- [Strongly Connected Component Algorithms](https://awesome-repositories.com/f/user-interface-experience/data-display-components/graph-components/strongly-connected-component-algorithms.md) — Implements algorithms to detect strongly connected components, articulation points, and bridges in networks. ([source](https://github.com/TheAlgorithms/C-Sharp/tree/master/Algorithms/Graph))
