Skip to content

kcywinski/Algorithms_Example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms Example

This repository contains examples of various algorithms which were written on different programming languages.

Implemented algorithms with languages:

Language Java Python Rust C C++ JavaScript Go C# Ruby Swift Racket
A*Search 👍 👍
BellmanFord 👍 👍
BestFirstSearch 👍 👍
BinaryGCD 👍
BinarySearch 👍 👍 👍 👍 👍 👍 👍 👍
Bitap Algorithm 👍 👍
BreadthFirstSearch 👍 👍 👍
Borwein's Algorithm 👍 👍
BubbleSort 👍 👍 👍 👍 👍 👍 👍 👍
Conjugate Gradient 👍
CountingSort 👍 👍 👍
DepthFirstSearch 👍 👍 👍 👍
Dijkstra's 👍 👍 👍 👍
Doomsday 👍 👍 👍 👍 👍 👍 👍
EditDistance 👍 👍
Edmonds-Karp 👍
ElevatorAlgorithm 👍
Fast Fourier Transform 👍
Fibonacci 👍 👍 👍 👍 👍 👍 👍 👍 👍
FisherYatesShuffle 👍 👍 👍 👍
FloodFill Algorithm 👍
Floyd'sAlgorithm 👍 👍 👍
GreatestCommonDivisor 👍 👍 👍 👍 👍
HammingDistance 👍 👍 👍 👍 👍
HeapSort 👍 👍 👍 👍 👍 👍
HistogramEqualization 👍
InsertionSort 👍 👍 👍 👍 👍 👍 👍 👍 👍
Inverse Fast Fourier Transform 👍
Johnson algorithm 👍 👍 👍
Kadane's algorithm 👍 👍 👍 👍 👍 👍
Knuth Morris Prath Algorithm 👍 👍 👍
LinearSearch 👍 👍 👍 👍 👍 👍 👍
Longest-Common-Subsequence 👍 👍 👍 👍 👍
Longest-Increasing-Subsequence 👍 👍 👍
LongestPath 👍
MergeSort 👍 👍 👍 👍 👍 👍 👍
MiniMaxWithABPruning 👍
Modified_Binary_Search 👍
Pearson Hashing 👍
Postman Sort 👍
Quick Sort 👍 👍 👍 👍 👍 👍 👍 👍
Quick Select 👍 👍 👍 👍
Uniform-cost search 👍 👍 👍
RadixSort 👍 👍 👍
RobinCarp 👍
SelectionSort 👍 👍 👍 👍 👍 👍 👍 👍
ShellSort 👍 👍 👍
SieveofEratosthenes 👍 👍 👍 👍 👍
UnaryCoding 👍 👍 👍
VEGAS Algorithm 👍
TernarySearch 👍 👍 👍 👍
Topological Sort 👍
Segmented Sieve 👍 👍 👍
Union Find 👍 👍 👍
Xor swap 👍

List of Algorithms :

  • 3Dc : a lossy data compression algorithm for normal maps

  • A-law algorithm : standard companding algorithm

  • AdaBoost : adaptive boosting

  • Adaptive histogram equalization : histogram equalization which adapts to local changes in contrast

  • Adaptive Huffman coding : adaptive coding technique based on Huffman coding

  • Adaptive replacement cache : better performance than LRU

  • Aho–Corasick string matching algorithm : trie based algorithm for finding all substring matches to any of a finite set of strings

  • Algorithm X : a nondeterministic algorithm

  • Algorithms for calculating variance : avoiding instability and numerical overflow

  • ALOPEX : a correlation-based machine-learning algorithm

  • Alpha max plus beta min algorithm : an approximation of the square-root of the sum of two squares

  • Alpha-beta pruning : search to reduce number of nodes in minimax algorithm

  • Approximate counting algorithm : Allows counting large number of events in a small register

  • Average-linkage clustering : a simple agglomerative clustering algorithm

  • Backpropagation : A supervised learning method which requires a teacher that knows, or can calculate, the desired output for any given input

  • Backtracking : abandons partial solutions when they are found not to satisfy a complete solution

  • Bailey–Borwein–Plouffe formula : (BBP formula) a spigot algorithm for the computation of the nth binary digit of π

  • Banker's algorithm : Algorithm used for deadlock avoidance.

  • Barnes–Hut simulation : Solves the n-body problem in an approximate way that has the order log(n) instead of O(n*n) as in a direct-sum simulation.

  • Baum–Welch algorithm : compute maximum likelihood estimates and posterior mode estimates for the parameters of a hidden markov model

  • BCJR algorithm : decoding of error correcting codes defined on trellises (principally convolutional codes)

  • Beam search : is a heuristic search algorithm that is an optimization of best-first search that reduces its memory requirement

  • Beam stack search : integrates backtracking with beam search

  • Bees algorithm : a search algorithm which mimics the food foraging behavior of swarms of honey bees

  • Bellman–Ford algorithm : computes shortest paths in a weighted graph (where some of the edge weights may be negative)

  • Benson's algorithm : an algorithm for solving linear vector optimization problems

  • Best Bin First : find an approximate solution to the Nearest neighbor search problem in very-high-dimensional spaces

  • Best-first search : traverses a graph in the order of likely importance using a priority queue

  • BFGS method : A nonlinear optimization algorithm

  • Biconjugate gradient method : solves systems of linear equations

  • Bidirectional search : find the shortest path from an initial vertex to a goal vertex in a directed graph

  • Bilinear interpolation : an extension of linear interpolation for interpolating functions of two variables on a regular grid

  • Binary GCD algorithm : Efficient way of calculating GCD.

  • Binary search algorithm : locates an item in a sorted sequence

  • Binary splitting : a divide and conquer technique which speeds up the numerical evaluation of many types of series with rational terms

  • Birkhoff interpolation : an extension of polynomial interpolation

  • Bitap algorithm : fuzzy algorithm that determines if strings are approximately equal.

  • BKM algorithm : compute elementary functions using a table of logarithms

  • Blind deconvolution : image de-blurring algorithm when point spread function is unknown.

  • Bloom filter : a constant time and memory check to see whether a given element exists in a set. May return a false positive, but never a false negative.

  • Booth's multiplication algorithm : a multiplication algorithm that multiplies two signed binary numbers in two's complement notation

  • Borwein's algorithm : an algorithm to calculate the value of 1/π

  • Bowyer–Watson algorithm : create voronoi diagram in any number of dimensions

  • Boyer–Moore string search algorithm : amortized linear (sublinear in most times) algorithm for substring search

  • Boyer–Moore–Horspool algorithm : Simplification of Boyer–Moore

  • Breadth-first search : traverses a graph level by level

  • Brent's algorithm : finds a cycle in function value iterations using only two iterators

  • Bresenham's line algorithm : plots points of a 2-dimensional array to form a straight line between 2 specified points (uses decision variables)

  • Bron–Kerbosch algorithm : a technique for finding maximal cliques in an undirected graph

  • BrownBoost : a boosting algorithm that may be robust to noisy datasets

  • Bruss algorithm : see odds algorithm

  • Brute-force search : An exhaustive and reliable search method, but computationally inefficient in many applications.

    • D : an incremental heuristic search algorithm

    • Depth-first search : traverses a graph branch by branch

    • Dijkstra's algorithm : A special case of A for which no heuristic function is used

    • General Problem Solver : a seminal theorem-proving algorithm intended to work as a universal problem solver machine.

    • Jump point search : An optimization to A which may reduce computation time by an order of magnitude using further heuristics.

  • Bubble sort : for each pair of indices, swap the items if out of order

  • Buchberger's algorithm : finds a Gröbner basis

  • Buddy memory allocation : Algorithm to allocate memory such that fragmentation is less.

  • Bully algorithm : a method for dynamically selecting a coordinator

  • Burrows–Wheeler transform : preprocessing useful for improving lossless compression

  • Burstsort : build a compact, cache efficient burst trie and then traverse it to create sorted output

  • Buzen's algorithm : an algorithm for calculating the normalization constant G(K) in the Gordon–Newell theorem

  • Byzantine fault tolerance : good fault tolerance.

  • C3 linearization : an algorithm used primarily to obtain a consistent linearization of a multiple inheritance hierarchy in object-oriented programming

  • C4.5 algorithm : an extension to ID3

  • Cannon's algorithm : a distributed algorithm for matrix multiplication especially suitable for computers laid out in an N × N mesh

  • Canny edge detector : detect a wide range of edges in images

  • Canopy clustering algorithm : an unsupervised pre-clustering algorithm related to the K-means algorithm

  • Cantor–Zassenhaus algorithm : factor polynomials over finite fields

  • Chaff algorithm : an algorithm for solving instances of the boolean satisfiability problem

  • Chaitin's algorithm : a bottom-up, graph coloring register allocation algorithm that uses cost/degree as its spill metric

  • Chakravala method : a cyclic algorithm to solve indeterminate quadratic equations, including Pell's equation

  • Cheney's algorithm : An improvement on the Semi-space collector

  • Chew's second algorithm : create quality constrained Delaunay triangulations

  • Chien search : a recursive algorithm for determining roots of polynomials defined over a finite field

  • CHS conversion : converting between disk addressing systems

  • Closest pair problem : find the pair of points (from a set of points) with the smallest distance between them

  • Coloring algorithm : Graph coloring algorithm.

  • Complete-linkage clustering : a simple agglomerative clustering algorithm

  • Cone algorithm : identify surface points

  • Conjugate gradient : an algorithm for the numerical solution of particular systems of linear equations

  • Connected-component labeling : find and label disjoint regions

  • Constraint algorithm : a class of algorithms for satisfying constraints for bodies that obey Newton's equations of motion

  • Coppersmith–Winograd algorithm : square matrix multiplication

  • CORDIC : compute hyperbolic and trigonometric functions using a table of arctangents

  • Cross-entropy method : a general Monte Carlo approach to combinatorial and continuous multi-extremal optimization and importance sampling

  • Cuthill–McKee algorithm : reduce the bandwidth of a symmetric sparse matrix

  • Cycle sort : in-place with theoretically optimal number of writes

  • CYK algorithm : An O(n3) algorithm for parsing context-free grammars in Chomsky normal form

  • Daitch–Mokotoff Soundex : a Soundex refinement which allows matching of Slavic and Germanic surnames

  • Dancing Links : an efficient implementation of Algorithm X

  • Dantzig–Wolfe decomposition : an algorithm for solving linear programming problems with special structure

  • Davis–Putnam algorithm : check the validity of a first-order logic formula

  • DBSCAN : a density based clustering algorithm

  • DDA line algorithm : plots points of a 2-dimensional array to form a straight line between 2 specified points (uses floating-point math)

  • De Boor algorithm : B-splines

  • De Casteljau's algorithm : Bézier curves

  • Delta encoding : aid to compression of data in which sequential data occurs frequently

  • Demon algorithm : a Monte Carlo method for efficiently sampling members of a microcanonical ensemble with a given energy

  • Deutsch-Jozsa algorithm : criterion of balance for Boolean function

  • Dijkstra's algorithm : computes shortest paths in a graph with non-negative edge weights

  • Dinic's algorithm : is a strongly polynomial algorithm for computing the maximum flow in a flow network.

  • Discrete Green's Theorem : is an algorithm for computing double integral over a generalized rectangular domain in constant time. It is a natural extension to the summed area table algorithm

  • Doomsday algorithm : day of the week

  • Double dabble : Convert binary numbers to BCD

  • Double Metaphone : an improvement on Metaphone

  • Dynamic Markov compression : Compression using predictive arithmetic coding

  • Dynamic Programming : problems exhibiting the properties of overlapping subproblems and optimal substructure

  • Dynamic time warping : measure similarity between two sequences which may vary in time or speed

  • Earley parser : Another O(n3) algorithm for parsing any context-free grammar

  • Edmonds–Karp algorithm : implementation of Ford–Fulkerson

  • Elevator algorithm : Disk scheduling algorithm that works like an elevator.

  • Ellipsoid method : is an algorithm for solving convex optimization problems

  • Espresso heuristic logic minimizer : Fast algorithm for boolean function minimization.

  • Euclidean algorithm : computes the greatest common divisor

  • Euclidean minimum spanning tree : algorithms for computing the minimum spanning tree of a set of points in the plane

  • Euclidean shortest path problem : find the shortest path between two points that does not intersect any obstacle

  • Exponentiating by squaring : an algorithm used for the fast computation of large integer powers of a number

  • Extended Euclidean algorithm : Also solves the equation ax + by = c.

  • False position method : approximates roots of a function

  • Fast folding algorithm : an efficient algorithm for the detection of approximately periodic events within time series data

  • Fast Fourier Transform: A fast Fourier transform (FFT) algorithm computes the discrete Fourier transform (DFT) of a sequence

  • Faugère F4 algorithm : finds a Gröbner basis (also mentions the F5 algorithm)

  • Featherstone's algorithm : compute the effects of forces applied to a structure of joints and links

  • Fibonacci search technique : search a sorted sequence using a divide and conquer algorithm that narrows down possible locations with the aid of Fibonacci numbers

  • Filtered back-projection : efficiently compute the inverse 2-dimensional Radon transform.

  • Flood fill : fills a connected region of a multi-dimensional array with a specified symbol

  • Floyd's cycle-finding algorithm : finds a cycle in function value iterations

  • Floyd–Warshall algorithm : solves the all pairs shortest path problem in a weighted, directed graph

  • Ford–Fulkerson algorithm : computes the maximum flow in a graph

  • Fortune's Algorithm : create voronoi diagram

  • Fowler–Noll–Vo hash function : fast with low collision rate

  • Fractal compression : method used to compress images using fractals

  • Freivalds' algorithm : a randomized algorithm used to verify matrix multiplication

  • Fürer's algorithm : an integer multiplication algorithm for very large numbers possessing a very low asymptotic complexity

  • Gale–Shapley algorithm : solves the stable marriage problem

  • Gauss–Jordan elimination : solves systems of linear equations

  • Gauss–Legendre algorithm : computes the digits of pi

  • Gauss–Newton algorithm : An algorithm for solving nonlinear least squares problems.

  • Gauss–Seidel method : solves systems of linear equations iteratively

  • Generational garbage collector : Fast garbage collectors that segregate memory by age

  • Geometric hashing : a method for efficiently finding two-dimensional objects represented by discrete points that have undergone an affine transformation

  • Gerchberg–Saxton algorithm : Phase retrieval algorithm for optical planes

  • Gibbs sampling : generate a sequence of samples from the joint probability distribution of two or more random variables

  • Gilbert–Johnson–Keerthi distance algorithm : determining the smallest distance between two convex shapes.

  • Girvan–Newman algorithm : detect communities in complex systems

  • GLR parser : An algorithm for parsing any context-free grammar by Masaru Tomita. It is tuned for deterministic grammars, on which it performs almost linear time and O(n3) in worst case.

  • Goertzel algorithm : identify a particular frequency component in a signal. Can be used for DTMF digit decoding.

  • Golden section search : an algorithm for finding the maximum of a real function

  • Golomb coding : form of entropy coding that is optimal for alphabets following geometric distributions

  • Gosper's algorithm : find sums of hypergeometric terms that are themselves hypergeometric terms

  • Gouraud shading : an algorithm to simulate the differing effects of light and colour across the surface of an object in 3D computer graphics

  • Gram–Schmidt process : orthogonalizes a set of vectors

  • Grover's algorithm : provides quadratic speedup for many search problems

  • GrowCut algorithm : an interactive segmentation algorithm

  • Halley's method : uses first and second derivatives

  • Hamming distance : sum number of positions which are different

  • Hamming(7,4) : a Hamming code that encodes 4 bits of data into 7 bits by adding 3 parity bits

  • Heap's permutation generation algorithm : interchange elements to generate next permutation

  • Heapsort : convert the list into a heap, keep removing the largest element from the heap and adding it to the end of the list

  • Hirschberg's algorithm : finds the least cost sequence alignment between two sequences, as measured by their Levenshtein distance

  • Histogram equalization : use histogram to improve image contrast

  • HMAC : keyed-hash message authentication

  • Hopcroft's algorithm, Moore's algorithm, and Brzozowski's algorithm : algorithms for minimizing the number of states in a deterministic finite automaton

  • Hopcroft–Karp algorithm : convert a bipartite graph to a maximum cardinality matching

  • Hopfield net : a Recurrent neural network in which all connections are symmetric

  • Hungarian algorithm : algorithm for finding a perfect matching

  • Hungarian method : a combinatorial optimization algorithm which solves the assignment problem in polynomial time

  • Hybrid Monte Carlo : generate a sequence of samples using Hamiltonian weighted Markov chain Monte Carlo, from a probability distribution which is difficult to sample directly.

  • Incremental encoding : delta encoding applied to sequences of strings

  • Insertion sort : determine where the current item belongs in the list of sorted ones, and insert it there

  • Inside-outside algorithm : An O(n3) algorithm for re-estimating production probabilities in probabilistic context-free grammars

  • Introsort : begin with quicksort and switch to heapsort when the recursion depth exceeds a certain level

  • Inverse Fast Fourier Transform: Inverse Fast Fourier transform (IFFT) algorithm computes the inverse discrete Fourier transform (Inverse DFT) of a sequence

  • Jaro–Winkler distance : is a measure of similarity between two strings

  • Johnson algorithm : All pairs shortest path algorithm in sparse weighted directed graph

  • Jump-and-Walk algorithm : an algorithm for point location in triangulations

  • k-means clustering : cluster objects based on attributes into partitions

  • k-means++ : a variation of this, using modified random seeds

  • k-medoids : similar to k-means, but chooses datapoints or medoids as centers

  • Kabsch algorithm : calculate the optimal alignment of two sets of points in order to compute the root mean squared deviation between two protein structures.

  • Kadane's algorithm : finds maximum sub-array of any size

  • Kahan summation algorithm : a more accurate method of summing floating-point numbers

  • Kalman filter : estimate the state of a linear dynamic system from a series of noisy measurements

  • Karatsuba algorithm : an efficient procedure for multiplying large numbers

  • Karger's algorithm : a Monte Carlo method to compute the minimum cut of a connected graph

  • Karmarkar's algorithm : The first reasonably efficient algorithm that solves the linear programming problem in polynomial time.

  • Karn's Algorithm : addresses the problem of getting accurate estimates of the round-trip time for messages when using TCP

  • Karplus-Strong string synthesis : physical modelling synthesis to simulate the sound of a hammered or plucked string or some types of percussion

  • KHOPCA clustering algorithm : a local clustering algorithm, which produces hierarchical multi-hop clusters in static and mobile environments.

  • Knuth–Bendix completion algorithm : for rewriting rule systems

  • Knuth–Morris–Pratt algorithm : substring search which bypasses reexamination of matched characters

  • Lagrange interpolation : interpolation using Lagrange polynomials

  • Lamport ordering : a partial ordering of events based on the happened-before relation

  • Laplacian smoothing : an algorithm to smooth a polygonal mesh

  • Lesk algorithm : word sense disambiguation

  • Levenberg–Marquardt algorithm : An algorithm for solving nonlinear least squares problems.

  • Levenshtein edit distance : compute a metric for the amount of difference between two sequences

  • Levinson recursion : solves equation involving a Toeplitz matrix

  • Linde–Buzo–Gray algorithm : a vector quantization algorithm to derive a good codebook

  • Linde–Buzo–Gray algorithm : a vector quantization algorithm used to derive a good codebook

  • Linear interpolation : a method of curve fitting using linear polynomials

  • Linear search : finds an item in an unsorted sequence

  • LL parser : A relatively simple linear time parsing algorithm for a limited class of context-free grammars

  • LogitBoost : logistic regression boosting

  • Longest common subsequence problem : Find the longest subsequence common to all sequences in a set of sequences

  • Longest common substring problem : find the longest string (or strings) that is a substring (or are substrings) of two or more strings

  • Longest increasing subsequence problem : Find the longest increasing subsequence of a given sequence

  • Longest path problem : find a simple path of maximum length in a given graph

  • LPBoost : linear programming boosting

  • Luhn algorithm : a method of validating identification numbers

  • Luhn mod N algorithm : extension of Luhn to non-numeric characters

  • Luleå algorithm : a technique for storing and searching internet routing tables efficiently

  • LZWL : syllable-based variant

  • Marching cubes : extract a polygonal mesh of an isosurface from a three-dimensional scalar field (sometimes called voxels)

  • Marching squares : generate contour lines for a two-dimensional scalar field

  • Marching tetrahedrons : an alternative to Marching cubes

  • Marching triangles : reconstruct two-dimensional surface geometry from an unstructured point cloud

  • Mark-compact algorithm : a combination of the mark-sweep algorithm and Cheney's copying algorithm

  • Marr–Hildreth algorithm : an early edge detection algorithm

  • Match Rating Approach : a phonetic algorithm developed by Western Airlines

  • MaxCliqueDyn maximum clique algorithm : find a maximum clique in an undirected graph

  • Maximum parsimony (phylogenetics) : an algorithm for finding the simplest phylogenetic tree to explain a given character matrix.

  • Merge sort : sort the first and second half of the list separately, then merge the sorted lists

  • Metaphone : an algorithm for indexing words by their sound, when pronounced in English

  • Metropolis–Hastings algorithm : used to generate a sequence of samples from the probability distribution of one or more variables

  • Midpoint circle algorithm : an algorithm used to determine the points needed for drawing a circle

  • Minimum bounding box algorithms : find the oriented minimum bounding box enclosing a set of points

  • Minimum degree algorithm : permute the rows and columns of a symmetric sparse matrix before applying the Cholesky decomposition

  • MISER algorithm : Monte Carlo simulation, numerical integration

  • Monotone cubic interpolation : a variant of cubic interpolation that preserves monotonicity of the data set being interpolated.

  • Montgomery reduction : an algorithm that allows modular arithmetic to be performed efficiently when the modulus is large

  • Mu-law algorithm : standard analog signal compression or companding algorithm

  • Muller's method : 3-point, quadratic interpolation

  • Multivariate division algorithm : for polynomials in several indeterminates

  • Nagle's algorithm : improve the efficiency of TCP/IP networks by coalescing packets

  • Nearest neighbor search : find the nearest point or points to a query point

  • Needleman–Wunsch algorithm : find global alignment between two sequences

  • Nested sampling algorithm : a computational approach to the problem of comparing models in Bayesian statistics

  • Newell's algorithm : eliminate polygon cycles in the depth sorting required in hidden surface removal

  • Newton's method : finds zeros of functions with calculus

  • Newton–Raphson division : uses Newton's method to find the reciprocal of D, and multiply that reciprocal by N to find the final quotient Q.

  • NYSIIS : phonetic algorithm, improves on Soundex

  • Odlyzko–Schönhage algorithm : calculates nontrivial zeroes of the Riemann zeta function

  • OPTICS : a density based clustering algorithm with a visual evaluation method

  • Package-merge algorithm : Optimizes Huffman coding subject to a length restriction on code strings

  • Packrat parser : A linear time parsing algorithm supporting some context-free grammars and parsing expression grammars

  • Painter's algorithm : detects visible parts of a 3-dimensional scenery

  • Pareto interpolation : a method of estimating the median and other properties of a population that follows a Pareto distribution.

  • Parity : simple/fast error detection technique

  • Partial least squares regression : finds a linear model describing some predicted variables in terms of other observable variables

  • Paxos algorithm : a family of protocols for solving consensus in a network of unreliable processors

  • Pearson hashing : computes 8 bit value only, optimized for 8 bit computers

  • Perceptron : the simplest kind of feedforward neural network: a linear classifier.

  • Petrick's method : Another algorithm for boolean simplification.

  • Phong shading : an algorithm to interpolate surface normal-vectors for surface shading in 3D computer graphics

  • Polynomial long division : an algorithm for dividing a polynomial by another polynomial of the same or lower degree

  • Postman sort : variant of Bucket sort which takes advantage of hierarchical structure

  • Powerset construction : Algorithm to convert nondeterministic automaton to deterministic automaton.

  • Predictive search : binary-like search which factors in magnitude of search term versus the high and low values in the search. Sometimes called dictionary search or interpolated search.

  • Prüfer coding : conversion between a labeled tree and its Prüfer sequence

  • Push–relabel algorithm : computes a maximum flow in a graph

  • Q-learning : learn an action-value function that gives the expected utility of taking a given action in a given state and following a fixed policy thereafter

  • Quickselect : selection algorithm to find the kth smallest element in an unordered list

  • Quicksort : divide list into two, with all items on the first list coming before all items on the second list.; then sort the two lists. Often the method of choice

  • Quine–McCluskey algorithm : Also called as Q-M algorithm, programmable method for simplifying the boolean equations.

  • Rabin–Karp string search algorithm : searches multiple patterns efficiently

  • Radial basis function network : an artificial neural network that uses radial basis functions as activation functions

  • Radix sort : sorts strings letter by letter

  • Rainflow-counting algorithm : Reduces a complex stress history to a count of elementary stress-reversals for use in fatigue analysis

  • Ramer–Douglas–Peucker algorithm : Given a 'curve' composed of line segments to find a curve not too dissimilar but that has fewer points

  • Random forest : classify using many decision trees

  • Range encoding : same as arithmetic coding, but looked at in a slightly different way

  • Recursive descent parser : A top-down parser suitable for LL(k) grammars

  • Rete algorithm : an efficient pattern matching algorithm for implementing production rule systems

  • Rice coding : form of entropy coding that is optimal for alphabets following geometric distributions

  • Richardson–Lucy deconvolution : image de-blurring algorithm

  • Ridder's method : 3-point, exponential scaling

  • Risch algorithm : an algorithm for the calculus operation of indefinite integration (i.e. finding antiderivatives)

  • Rotating calipers : determine all antipodal pairs of points and vertices on a convex polygon or convex hull.

  • Rounding functions : the classic ways to round numbers

  • Run-length encoding : lossless data compression taking advantage of strings of repeated characters

  • Scanline rendering : constructs an image by moving an imaginary line over the image

  • Schensted algorithm : constructs a pair of Young tableaux from a permutation

  • Schreier–Sims algorithm : computing a base and strong generating set (BSGS) of a permutation group

  • Schönhage–Strassen algorithm : an asymptotically fast multiplication algorithm for large integers

  • Scoring algorithm : is a form of Newton's method used to solve maximum likelihood equations numerically

  • Seam carving : content-aware image resizing algorithm

  • Secant method : 2-point, 1-sided

  • Selection algorithm : finds the kth largest item in a sequence

  • Selection sort : pick the smallest of the remaining elements, add it to the end of the sorted list

  • Self-organizing map : an unsupervised network that produces a low-dimensional representation of the input space of the training samples

  • Semi-space collector : An early copying collector

  • SEQUITUR algorithm : lossless compression by incremental grammar inference on a string

  • Sethi-Ullman algorithm : generate optimal code for arithmetic expressions

  • Shannon–Fano–Elias coding : precursor to arithmetic encoding[1]

  • Shell sort : an attempt to improve insertion sort

  • Shifting nth-root algorithm : digit by digit root extraction

  • Shoelace algorithm : determine the area of a polygon whose vertices are described by ordered pairs in the plane

  • Shor's algorithm : provides exponential speedup (relative to currently known non-quantum algorithms) for factoring a number

  • Shortest seek first : Disk scheduling algorithm to reduce seek time.

  • Shunting yard algorithm : convert an infix-notation math expression to postfix

  • Simon's algorithm : provides a provably exponential speedup (relative to any non-quantum algorithm) for a black-box problem

  • Simplex algorithm : An algorithm for solving linear programming problems

  • Single-linkage clustering : a simple agglomerative clustering algorithm

  • Smith–Waterman algorithm : find local sequence alignment

  • Sorting by signed reversals : an algorithm for understanding genomic evolution.

  • Soundex : a phonetic algorithm for indexing names by sound, as pronounced in English

  • Spigot algorithm : A way to compute the value of a mathematical constant without knowing preceding digits

  • SSS : state space search traversing a game tree in a best-first fashion similar to that of the A* search algorithm

  • Stemming algorithm : a method of reducing words to their stem, base, or root form

  • Stone's method : also known as the strongly implicit procedure or SIP, is an algorithm for solving a sparse linear system of equations

  • Strassen algorithm : faster matrix multiplication

  • Structured SVM : allows training of a classifier for general structured output labels.

  • SUBCLU : a subspace clustering algorithm

  • Sukhotin's algorithm : a statistical classification algorithm for classifying characters in a text as vowels or consonants

  • SURF (Speeded Up Robust Features) : is a robust local feature detector, first presented by Herbert Bay et al. in 2006, that can be used in computer vision tasks like object recognition or 3D reconstruction. It is partly inspired by the SIFT descriptor. The standard version of SURF is several times faster than SIFT and claimed by its authors to be more robust against different image transformations than SIFT.

  • Sweep and prune : a broad phase algorithm used during collision detection to limit the number of pairs of solids that need to be checked for collision

  • Symbolic Cholesky decomposition : Efficient way of storing sparse matrix

  • Tarjan's off-line least common ancestors algorithm : compute lowest common ancestors for pairs of nodes in a tree

  • Tarski–Kuratowski algorithm : a non-deterministic algorithm which provides an upper bound for the complexity of formulas in the arithmetical hierarchy and analytical hierarchy

  • Ternary search : a technique for finding the minimum or maximum of a function that is either strictly increasing and then strictly decreasing or vice versa

  • Timsort : adaptative algorithm derived from merge sort and insertion sort. Used in Python 2.3 and up, and Java SE 7.

  • Todd–Coxeter algorithm : Procedure for generating cosets.

  • Tomasulo algorithm : allows sequential instructions that would normally be stalled due to certain dependencies to execute non-sequentially

  • Toom–Cook multiplication : (Toom3) a multiplication algorithm for large integers

  • Top-nodes algorithm : resource calendar management

  • Topological sort : finds linear order of nodes (e.g. jobs) based on their dependencies.

  • Transform coding : type of data compression for "natural" data like audio signals or photographic images

  • Trigram search : search for text when the exact syntax or spelling of the target object is not precisely known

  • Ukkonen's algorithm : a linear-time, online algorithm for constructing suffix trees

  • Unary coding : code that represents a number n with n ones followed by a zero

  • Uniform binary search : an optimization of the classic binary search algorithm

  • Uniform-cost search : a tree search that finds the lowest cost route where costs vary

  • UPGMA : a distance-based phylogenetic tree construction algorithm.

  • Vector clocks : generate a partial ordering of events in a distributed system and detect causality violations

  • Vector quantization : technique often used in lossy data compression

  • VEGAS algorithm : a method for reducing error in Monte Carlo simulations

  • Velvet : a set of algorithms manipulating de Bruijn graphs for genomic sequence assembly

  • Vincenty's formulae : a fast algorithm to calculate the distance between two latitude/longitude points on an ellipsoid

  • Viterbi algorithm : find the most likely sequence of hidden states in a hidden markov model

  • WACA clustering algorithm : a local clustering algorithm with potentially multi-hop structures; for dynamic networks

  • Wang and Landau algorithm : an extension of Metropolis–Hastings algorithm sampling

  • Warnsdorff's algorithm : A heuristic method for solving the Knight's Tour problem.

    • A : special case of best-first search that uses heuristics to improve speed

    • B : a best-first graph search algorithm that finds the least-cost path from a given initial node to any goal node (out of one or more possible goals)

  • Watershed transformation : a class of algorithms based on the watershed analogy

  • Wavelet compression : form of data compression well suited for image compression (sometimes also video compression and audio compression)

  • Winnow algorithm : related to the perceptron, but uses a multiplicative weight-update scheme

  • Xiaolin Wu's line algorithm : algorithm for line antialiasing.

  • Xor swap algorithm : swaps the values of two variables without using a buffer

  • Yamartino method : calculate an approximation to the standard deviation σθ of wind direction θ during a single pass through the incoming data

  • Zhu–Takaoka string matching algorithm : a variant of the Boyer–Moore

  • Ziggurat algorithm : generate random numbers from a non-uniform distribution

  • Zobrist hashing : used in the implementation of transposition tables

  • Union Find : used to know if there is a path between 2 objects or not

  • Fibonacci Recursive : Fibonacci series printed using Java Recursion

Folder structure should be [Algorithm name]/[language]/file

For example:

  • BubbleSort/Go/BubbleSort.go
  • QuickSort/C++/QuickSort.cpp

License

Apache License 2.0

About

List of Algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 30.1%
  • C++ 26.4%
  • Python 17.9%
  • JavaScript 7.6%
  • C 4.5%
  • Swift 4.2%
  • Other 9.3%