## jcla1's Algorithm Implementations

I have contributed 83 implementations!

Visit Github Profile

go

javascript

scala

• #### ackermann

go

In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is not primitive recursive. All primitive recursive functions are total and ...

• #### ackermann

python

In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is not primitive recursive. All primitive recursive functions are total and ...

• #### ackermann

scala

In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is not primitive recursive. All primitive recursive functions are total and ...

• #### average

javascript

In colloquial language, an average is the sum of a list of numbers divided by the number of numbers in the list. In mathematics and statistics, this would be called the arithmetic mean. However, the word average may also refer to the median, mode, or ...

• #### average

scala

In colloquial language, an average is the sum of a list of numbers divided by the number of numbers in the list. In mathematics and statistics, this would be called the arithmetic mean. However, the word average may also refer to the median, mode, or ...

• #### binary search

go

In computer science, a binary search or half-interval search algorithm finds the position of a target value within a sorted array. The binary search algorithm can be classified as a dichotomic divide and conquer search algorithm and executes in ...

• #### binary search

javascript

In computer science, a binary search or half-interval search algorithm finds the position of a target value within a sorted array. The binary search algorithm can be classified as a dichotomic divide and conquer search algorithm and executes in ...

• #### binary search

python

In computer science, a binary search or half-interval search algorithm finds the position of a target value within a sorted array. The binary search algorithm can be classified as a dichotomic divide and conquer search algorithm and executes in ...

• #### binary search

ruby

In computer science, a binary search or half-interval search algorithm finds the position of a target value within a sorted array. The binary search algorithm can be classified as a dichotomic divide and conquer search algorithm and executes in ...

• #### bogosort

go

In computer science, bogosort (also stupid sort, slowsort, random sort, shotgun sort or monkey sort ) is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for ...

• #### bogosort

java

In computer science, bogosort (also stupid sort, slowsort, random sort, shotgun sort or monkey sort ) is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for ...

• #### bogosort

javascript

In computer science, bogosort (also stupid sort, slowsort, random sort, shotgun sort or monkey sort ) is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for ...

• #### bogosort

python

In computer science, bogosort (also stupid sort, slowsort, random sort, shotgun sort or monkey sort ) is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for ...

• #### bogosort

ruby

In computer science, bogosort (also stupid sort, slowsort, random sort, shotgun sort or monkey sort ) is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for ...

• #### boyer moore horspool

go

In computer science, the BoyerMooreHorspool algorithm or Horspool's algorithm is an algorithm for finding substrings in strings. It was published by Nigel Horspool in 1980. It is a simplification of the BoyerMoore string search algorithm which is ...

• #### boyer moore horspool

python

In computer science, the BoyerMooreHorspool algorithm or Horspool's algorithm is an algorithm for finding substrings in strings. It was published by Nigel Horspool in 1980. It is a simplification of the BoyerMoore string search algorithm which is ...

go

python

ruby

• #### bresenham line

go

Bresenham's line algorithm is an algorithm that determines the points of an n -dimensional raster that should be selected in order to form a close approximation to a straight line between two points. It is commonly used to draw lines on a computer ...

• #### bubble sort

go

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is ...

• #### caesar cipher

go

In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the ...

• #### catalan numbers

go

In combinatorial mathematics, the Catalan numbers form a sequence of natural numbers that occur in various counting problems, often involving recursively -defined objects. They are named after the Belgian mathematician Eugne Charles Catalan ...

• #### catalan numbers

javascript

In combinatorial mathematics, the Catalan numbers form a sequence of natural numbers that occur in various counting problems, often involving recursively -defined objects. They are named after the Belgian mathematician Eugne Charles Catalan ...

• #### catalan numbers

python

In combinatorial mathematics, the Catalan numbers form a sequence of natural numbers that occur in various counting problems, often involving recursively -defined objects. They are named after the Belgian mathematician Eugne Charles Catalan ...

• #### catalan numbers

scala

In combinatorial mathematics, the Catalan numbers form a sequence of natural numbers that occur in various counting problems, often involving recursively -defined objects. They are named after the Belgian mathematician Eugne Charles Catalan ...

• #### chebyshev distance

scala

In mathematics, Chebyshev distance (or Tchebychev distance ), maximum metric, or L metric is a metric defined on a vector space where the distance between two vectors is the greatest of their differences along any coordinate dimension. It is named ...

• #### counting sort

go

In computer science, counting sort is an algorithm for sorting a collection of objects according to keys that are small integers ; that is, it is an integer sorting algorithm. It operates by counting the number of objects that have each distinct key ...

• #### dekkers algorithm

go

Dekker's algorithm is the first known correct solution to the mutual exclusion problem in concurrent programming. The solution is attributed to Dutch mathematician Th. J. Dekker by Edsger W. Dijkstra in an unpublished paper on sequential process ...

• #### egyptian fractions

An Egyptian fraction is a finite series of distinct unit fractions, such as. That is, each fraction in the expression has a numerator equal to 1 and a denominator that is a positive integer, and all the denominators differ from each other. The value ...

• #### egyptian fractions

python

An Egyptian fraction is a finite series of distinct unit fractions, such as. That is, each fraction in the expression has a numerator equal to 1 and a denominator that is a positive integer, and all the denominators differ from each other. The value ...

• #### egyptian fractions

ruby

An Egyptian fraction is a finite series of distinct unit fractions, such as. That is, each fraction in the expression has a numerator equal to 1 and a denominator that is a positive integer, and all the denominators differ from each other. The value ...

• #### egyptian fractions

scala

An Egyptian fraction is a finite series of distinct unit fractions, such as. That is, each fraction in the expression has a numerator equal to 1 and a denominator that is a positive integer, and all the denominators differ from each other. The value ...

• #### euclidean algorithm

go

In mathematics, the Euclidean algorithm [a], or Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two numbers, the largest number that divides both of them without leaving a remainder. It is named after the ...

• #### euclidean algorithm

javascript

In mathematics, the Euclidean algorithm [a], or Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two numbers, the largest number that divides both of them without leaving a remainder. It is named after the ...

• #### euclidean algorithm

python

In mathematics, the Euclidean algorithm [a], or Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two numbers, the largest number that divides both of them without leaving a remainder. It is named after the ...

• #### euclidean distance

apl

In mathematics, the Euclidean distance or Euclidean metric is the ordinary (i.e straight line) distance between two points in Euclidean space. With this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean ...

• #### euclidean distance

In mathematics, the Euclidean distance or Euclidean metric is the ordinary (i.e straight line) distance between two points in Euclidean space. With this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean ...

• #### euclidean distance

javascript

In mathematics, the Euclidean distance or Euclidean metric is the ordinary (i.e straight line) distance between two points in Euclidean space. With this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean ...

• #### euclidean distance

python

In mathematics, the Euclidean distance or Euclidean metric is the ordinary (i.e straight line) distance between two points in Euclidean space. With this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean ...

• #### euclidean distance

ruby

In mathematics, the Euclidean distance or Euclidean metric is the ordinary (i.e straight line) distance between two points in Euclidean space. With this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean ...

• #### euclidean distance

scala

In mathematics, the Euclidean distance or Euclidean metric is the ordinary (i.e straight line) distance between two points in Euclidean space. With this distance, Euclidean space becomes a metric space. The associated norm is called the Euclidean ...

• #### euclidean norm

apl

In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space save possibly for the zero vector, which is assigned a length of zero. A ...

• #### euclidean norm

In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space save possibly for the zero vector, which is assigned a length of zero. A ...

• #### euclidean norm

python

In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space save possibly for the zero vector, which is assigned a length of zero. A ...

• #### euclidean norm

ruby

In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space save possibly for the zero vector, which is assigned a length of zero. A ...

• #### euclidean norm

scala

In linear algebra, functional analysis and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space save possibly for the zero vector, which is assigned a length of zero. A ...

• #### factorial

apl

In mathematics, the factorial of a non-negative integer n, denoted by n !, is the product of all positive integers less than or equal to n. For example, The value of 0! is 1, according to the convention for an empty product. The factorial ...

• #### factorial

go

In mathematics, the factorial of a non-negative integer n, denoted by n !, is the product of all positive integers less than or equal to n. For example, The value of 0! is 1, according to the convention for an empty product. The factorial ...

• #### factorial

prolog

In mathematics, the factorial of a non-negative integer n, denoted by n !, is the product of all positive integers less than or equal to n. For example, The value of 0! is 1, according to the convention for an empty product. The factorial ...

• #### factorial

scala

In mathematics, the factorial of a non-negative integer n, denoted by n !, is the product of all positive integers less than or equal to n. For example, The value of 0! is 1, according to the convention for an empty product. The factorial ...

c

• #### fibonacci series

apl

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fibonacci series

go

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fibonacci series

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fibonacci series

prolog

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fibonacci series

python

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fibonacci series

ruby

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fibonacci series

scala

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence : or (often, in modern usage): By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending ...

• #### fisher-yates

c#

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### fisher-yates

c

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### fisher-yates

go

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### fisher-yates

java

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### fisher-yates

javascript

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### fisher-yates

python

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### fisher-yates

ruby

The Fisher–Yates shuffle (named after Ronald Fisher and Frank Yates), also known as the Knuth shuffle (after Donald Knuth), is an algorithm for generating a random permutation of a finite set—in plain terms, for randomly shuffling the set. The modern ...

• #### gnome sort

go

Gnome sort (or Stupid sort ) is a sorting algorithm originally proposed by Dr. Hamid Sarbazi-Azad (Professor of Computer Engineering at Sharif University of Technology ) in 2000 and called stupid sort (not to be confused with bogosort ), and then ...

• #### gnome sort

python

Gnome sort (or Stupid sort ) is a sorting algorithm originally proposed by Dr. Hamid Sarbazi-Azad (Professor of Computer Engineering at Sharif University of Technology ) in 2000 and called stupid sort (not to be confused with bogosort ), and then ...

• #### gnome sort

ruby

Gnome sort (or Stupid sort ) is a sorting algorithm originally proposed by Dr. Hamid Sarbazi-Azad (Professor of Computer Engineering at Sharif University of Technology ) in 2000 and called stupid sort (not to be confused with bogosort ), and then ...

go

javascript

python

• #### hamming distance

javascript

In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In another way, it measures the minimum number of substitutions required to change one string ...

• #### hamming distance

python

In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In another way, it measures the minimum number of substitutions required to change one string ...

• #### insertion sort

go

Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort. However, insertion sort ...

• #### knuth morris pratt

go

In computer science, the KnuthMorrisPratt string searching algorithm (or KMP algorithm ) searches for occurrences of a word W within a main text string S by employing the observation that when a mismatch occurs, the word itself embodies sufficient ...

• #### knuth morris pratt

javascript

In computer science, the KnuthMorrisPratt string searching algorithm (or KMP algorithm ) searches for occurrences of a word W within a main text string S by employing the observation that when a mismatch occurs, the word itself embodies sufficient ...

• #### levenshtein distance

go

In information theory and computer science, the Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (i.e. ...