C-Sharp icon indicating copy to clipboard operation
C-Sharp copied to clipboard

All algorithms implemented in C#.

The Algorithms - C#

Discord chat Build Status Codacy Badge codecov GuardRails badge Donate

This repository contains algorithms and data structures implemented in C# for educational purposes.

Overview

  • Algorithms

    • Data Compression
      • Burrows-Wheeler transform
      • Huffman Compressor
      • Shannon-Fano Compressor
    • Encoders
      • Caesar
      • Vigenere
      • Hill
      • NYSIIS
      • Soundex
      • Feistel
    • Graph
      • Minimum Spanning Tree
        • Prim's Algorithm (Adjacency Matrix)
        • Kruskal's Algorithm
      • BreadthFirstSearch
      • DepthFirstSearch
      • Dijkstra Shortest Path
      • Kosaraju
    • Knapsack problem
      • Naive solver
      • Dynamic Programming solver
      • Branch and bound solver
    • Linear Algebra
      • Distances
        • Euclidean
        • Manhattan
      • Eigenvalue
        • Power Iteration
    • Modular Arithmetic
      • Chinese Remainder Theorem
      • Extended Euclidean Algorithm
      • Modular Multiplicative Inverse
    • Numeric
      • Aliquot Sum Calculator
      • Amicable Numbers Checker
      • Decomposition
        • LU Decomposition
        • Thin Singular Vector Decomposition
      • Greatest Common Divisor
        • Euclidean GCD
        • Binary GCD
      • Factorization
        • Trial division Factorization
      • Modular Exponentiation
      • Series
        • Maclaurin Series
      • Gauss-Jordan Elimination
      • Keith Number Checker
      • Pseudo-Inverse
      • Narcissistic Number Checker
      • Perfect Number Checker
      • Perfect Square Checker
      • Euler Method
      • Miller-Rabin primality check
    • Searches
      • A-Star
      • Binary Search
      • Recursive Binary Search
      • Linear Search
      • Fast Search
      • Fibonacci Search
      • Jump 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
      • External
        • Merge Sort
      • Integer
        • Counting Sort
        • Bucket Sort
        • Radix Sort
      • String
        • MSD Radix Sort
        • Knuth–Morris–Pratt Search
    • Shufflers
      • Fisher-Yates Shuffler
    • Sequences
      • A000002 Kolakoski
      • A000004 Zero
      • A000005 Count of Divisors
      • A000008 Make Change
      • A000010 Euler's Totient
      • A000027 Natural
      • A000040 Primes
      • A000045 Fibonacci
      • A000079 Powers of 2
      • A000108 Catalan
      • A000142 Factorial
      • A000215 Fermat Numbers
      • A000290 Squares
      • A000578 Cubes
      • A000720 PrimePi
      • A001146 Number of Boolean Functions
      • A001462 Golomb's
      • A001478 Negative Integers
      • A002110 Primorial Numbers
      • 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
      • A010051 Binary Prime Constant
      • A011557 Powers of 10
      • A057588 Kummer Numbers
      • A019434 Fermat Primes
      • A181391 Van Eck's
    • String
      • Longest Consecutive Character
      • Naive String Search
      • Rabin Karp
      • Boyer Moore
      • Palindrome Checker
      • Get all permutations of a string
    • Other
      • Fermat Prime Checker
      • Sieve of Eratosthenes
      • Luhn
      • Mandelbrot
      • Koch Snowflake
      • RGB-HSV Conversion
      • Flood Fill
    • Problems
      • Stable Marriage
        • Gale-Shapley
      • N-Queens
        • Backtracking
      • Dynamic Coin Change
        • Dynamic
  • 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
    • 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
    • Graph
      • Directed Weighted Graph Via Adjacency Matrix
    • Disjoint Set
    • SortedList
    • Inverted index
    • Unrolled linked list
    • Tries
    • Cache
      • Least Frequently Used (LFU) Cache
      • Least Recently Used (LRU) Cache

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 detail. If you want to ask a question or suggest something, please open an issue.