The Algorithms - C#
All Algorithms implemented in C# - for education purposes
The repository is a collection of a variety of algorithms implemented in C#. The algorithms span over a variety of topics
from computer science, mathematics and statistics, data science, machine learning, engineering, etc. The implementations
and their associated documentations are meant to provide a learning resource for educators and students. Hence, one may
find more than one implementation for the same objective but using different algorithm strategies and optimizations.
List of Algorithms
-
Algorithms
- Crypto
- Paddings
- ISO 10125-2 Padding
- ISO 7816-4 Padding
- X9.32 Padding
- TBC Padding
- PKCS7 Padding
- Digests
- Ascon Hash Digest
- MD2 Digest
- Data Compression
- Burrows-Wheeler transform
- Huffman Compressor
- Shannon-Fano Compressor
- Encoders
- Caesar
- Vigenere
- Hill
- NYSIIS
- Soundex
- Feistel
- Blowfish
- Graph
- Minimum Spanning Tree
- Prim's Algorithm (Adjacency Matrix)
- Kruskal's Algorithm
- BreadthFirstTreeTraversal
- BreadthFirstSearch
- DepthFirstSearch
- Dijkstra Shortest Path
- FloydWarshall
- Kosaraju
- Knapsack problem
- Naive solver
- Dynamic Programming solver
- Branch and bound solver
- IHeuristicKnapsackSolver
- Linear Algebra
- Distances
- Chebyshev
- Euclidean
- Manhattan
- Minkowski
- Eigenvalue
- Modular Arithmetic
- Chinese Remainder Theorem
- Extended Euclidean Algorithm
- Modular Multiplicative Inverse
- Numeric
- Absolute
- Addition Without Arithmetic
- Aliquot Sum Calculator
- Amicable Numbers Checker
- Ceil
- Decomposition
- LU Decomposition
- Thin Singular Vector Decomposition
- Floor
- Greatest Common Divisor
- Factorization
- Trial division Factorization
- Modular Exponentiation
- Series
- Gauss-Jordan Elimination
- BinomialCoefficient
- Factorial
- Keith Number Checker
- Pseudo-Inverse
- Narcissistic Number Checker
- Perfect Cube Checker
- Perfect Number Checker
- Perfect Square Checker
- Euler Method
- Classic Runge-Kutta Method
- Miller-Rabin primality check
- KrishnamurthyNumberChecker
- Automorphic Number
- Josephus Problem
- Newton's Square Root Calculation
- SoftMax Function
- RecommenderSystem
- Searches
- A-Star
- Binary Search
- BoyerMoore Search
- Fast Search
- Fibonacci Search
- Interpolation Search
- Jump Search
- Linear Search
- Recursive Binary Search
- Sorts
- Comparison
- Binary Insertion Sort
- Bogo Sort
- Bubble Sort
- Cocktail Sort
- Comb Sort
- Cycle Sort
- Exchange Sort
- Heap Sort
- Insertion Sort
- Merge Sort
- Pancake Sort
- Quick Sort
- Median of three pivot
- Middle point pivot
- Random pivot
- Selection Sort
- Shell Sort
- Tim Sort
- Simplified Tim Sort
- External
- Integer
- Counting Sort
- Bucket Sort
- Radix Sort
- String
- Shufflers
- Sequences
- A000002 Kolakoski
- A000004 Zero
- A000005 Count of Divisors
- A000008 Make Change
- A000010 Euler's Totient
- A000012 All Ones
- A000027 Natural
- A000032 Lucas Numbers
- A000040 Primes
- A000045 Fibonacci
- A000079 Powers of 2
- A000108 Catalan
- A000120 1's Counting
- A000124 Central Polygonal Numbers
- A000125 Cake Numbers
- A000142 Factorial
- A000213 Tribonacci Numbers
- A000215 Fermat Numbers
- A000288 Tetranacci Numbers
- A000290 Squares
- A000292 Tetrahedral numbers
- A000578 Cubes
- A000720 PrimePi
- A001146 Number of Boolean Functions
- A001462 Golomb's
- A001478 Negative Integers
- A002110 Primorial Numbers
- A002717 Matchstick Triangle Arrangement
- A005132 Recaman's
- A006577 Number of '3n+1' steps to reach 1
- A006862 Euclid Numbers
- A006879 Number of Primes by Number of Digits
- A006880 Number of Primes by Powers of 10
- A007318 Binomial
- A007395 All Twos
- A010051 Binary Prime Constant
- A010701 All Threes
- A011557 Powers of 10
- A057588 Kummer Numbers
- A019434 Fermat Primes
- A181391 Van Eck's
- Stack
- Next Greater Element
- Balanced Parentheses Checker
- Reverse Stack
- String
- Similarity
- Cosine Similarity
- Damerau-Levenshtein Distance
- Hamming Distance
- Jaro Similarity
- Jaro-Winkler Distance
- Optimal String Alignment
- Pattern Matching
- Bitop Pattern Matching
- Naive String Search
- Rabin Karp
- Boyer Moore
- Knuth–Morris–Pratt Search
- WildCard Pattern Matching
- Z-block substring search
- Longest Consecutive Character
- Palindrome Checker
- Get all permutations of a string
- Other
- Fermat Prime Checker
- Sieve of Eratosthenes
- Luhn
- Int2Binary
- GeoLocation
- Mandelbrot
- Koch Snowflake
- RGB-HSV Conversion
- Flood Fill
- Pareto Optimization
- Gauss Optimization
- Decisions Convolutions
- Welford's Variance
- Julian Easter
- Pollard's Rho
- GeoLocation Hash
- Geofencing
- Triangulation Algorithm
- Problems
- Stable Marriage
- Gale-Shapley
- Accepter
- Proposer
- N-Queens
- Dynamic Programming
- Coin Change
- Levenshtein Distance
-
Data Structures
- Bit Array
- Timeline
- Segment Trees
- Segment Tree
- Segment Tree Multiplication
- Segment Tree Update
- Binary Search Tree
- Scapegoat Tree
- Fenwick tree (or Binary Indexed Tree)
- AA Tree
- AVL Tree
- Red-Black Tree
- Stack
- Array-based Stack
- List-based Stack
- Queue-based Stack
- Heap
- Min-Max Heap
- Binary Heap
- Fibonacci Heap
- Pairing Heap
- Probabilistic
- BloomFilter
- Count-Min Sketch
- HyperLogLog
- Queue
- Array-based Queue
- List-based Queue
- Stack-based Queue
- Linked List
- Singly Linked List
- Doubly Linked List
- Skip List
- Circular Linked List
- Graph
- Directed Weighted Graph Via Adjacency Matrix
- Disjoint Set
- SortedList
- Inverted index
- Unrolled linked list
- Tries
- HashTable
- Cache
- Least Frequently Used (LFU) Cache
- Least Recently Used (LRU) Cache
Project Update: .NET 8 Migration
As part of our continuous effort to stay up-to-date with the latest technologies, we have migrated our project to .NET 8. This upgrade enhances our project with the latest features and improvements from the .NET ecosystem.
New Requirements
- To build and run this project, .NET 8 SDK is now required.
- Ensure your development tools are compatible with .NET 8.
Building the Project
- With .NET 8 SDK installed, you can build the project using the standard
dotnet build command.
- All existing build scripts have been updated to accommodate the .NET 8 SDK.
Running Tests
- Our comprehensive suite of unit tests ensures compatibility with .NET 8.
- Run tests using the
dotnet test command as usual.
Contributing
You can contribute with pleasure to this repository.
Please orient on the directory structure and overall code style of this repository
and refer to our contributing guidelines for more details.
If you want to ask a question or suggest something, please open an issue.