jcla1's Algorithm Implementations

I have contributed 119 implementations!

Visit Github Profile
  • 10 harshad number

    go

    Puzzle: A Harshad Number, in a given number base, is an integer that is divisible by the sum of its digit when written in that base. Write a function that returns whether an integer is a Harshad Number or not (in base 10). Solution: Of the numbers ...

  • 10 harshad number

    javascript

    Puzzle: A Harshad Number, in a given number base, is an integer that is divisible by the sum of its digit when written in that base. Write a function that returns whether an integer is a Harshad Number or not (in base 10). Solution: Of the numbers ...

  • 10 harshad number

    scala

    Puzzle: A Harshad Number, in a given number base, is an integer that is divisible by the sum of its digit when written in that base. Write a function that returns whether an integer is a Harshad Number or not (in base 10). Solution: Of the numbers ...

  • 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. In statistics, mean, median, and mode are all known as measures of ...

  • 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. In statistics, mean, median, and mode are all known as measures of ...

  • binary search

    go

    In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value, whether alone or part of a record as a key, within a sorted array. It works by comparing the ...

  • binary search

    javascript

    In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value, whether alone or part of a record as a key, within a sorted array. It works by comparing the ...

  • binary search

    python

    In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value, whether alone or part of a record as a key, within a sorted array. It works by comparing the ...

  • binary search

    ruby

    In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value, whether alone or part of a record as a key, within a sorted array. It works by comparing the ...

  • bogosort

    go

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • bogosort

    java

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • bogosort

    javascript

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • bogosort

    python

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • bogosort

    ruby

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • 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 ...

  • bozosort

    go

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • bozosort

    python

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • bozosort

    ruby

    In computer science, bogosort (also permutation sort, stupid sort, slowsort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. The algorithm successively generates permutations of its ...

  • 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 after ...

  • 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

    haskell

    An Egyptian fraction is a finite sum 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 of an ...

  • egyptian fractions

    python

    An Egyptian fraction is a finite sum 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 of an ...

  • egyptian fractions

    ruby

    An Egyptian fraction is a finite sum 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 of an ...

  • egyptian fractions

    scala

    An Egyptian fraction is a finite sum 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 of an ...

  • 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

    haskell

    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 spacesave for the zero vector, which is assigned a length of zero. A seminorm, on ...

  • euclidean norm

    haskell

    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 spacesave for the zero vector, which is assigned a length of zero. A seminorm, on ...

  • 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 spacesave for the zero vector, which is assigned a length of zero. A seminorm, on ...

  • 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 spacesave for the zero vector, which is assigned a length of zero. A seminorm, on ...

  • 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 spacesave for the zero vector, which is assigned a length of zero. A seminorm, on ...

  • 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 operation is ...

  • 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 operation is ...

  • 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 operation is ...

  • 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 operation is ...

  • fast inv sqrt

    c

    Fast inverse square root (sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df) is a method of calculating x, the reciprocal (or multiplicative inverse) of a square root for a 32-bit floating point number in IEEE 754 ...

  • 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 on the ...

  • 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 on the ...

  • fibonacci series

    haskell

    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 on the ...

  • 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 on the ...

  • 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 on the ...

  • 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 on the ...

  • 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 on the ...

  • 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 later ...

  • 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 later ...

  • 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 later ...

  • golden ratio algorithms

    go

    The golden section search is a technique for finding the extremum (minimum or maximum) of a strictly unimodal function by successively narrowing the range of values inside which the extremum is known to exist. The technique derives its name from the ...

  • golden ratio algorithms

    javascript

    The golden section search is a technique for finding the extremum (minimum or maximum) of a strictly unimodal function by successively narrowing the range of values inside which the extremum is known to exist. The technique derives its name from the ...

  • golden ratio algorithms

    python

    The golden section search is a technique for finding the extremum (minimum or maximum) of a strictly unimodal function by successively narrowing the range of values inside which the extremum is known to exist. The technique derives its name from the ...

  • hamming distance

    javascipt

    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

    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 ...

  • 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 ...

  • 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 ...

  • 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 ...

  • 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 ...

  • 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 ...

  • 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. ...

  • levenshtein distance

    haskell

    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. ...

  • levenshtein distance

    javascript

    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. ...

  • linear search

    go

    In computer science, linear search or sequential search is a method for finding a particular value in a list that checks each element in sequence until the desired element is found or the list is exhausted. The list need not be ordered.Linear search is ...

  • linear search

    javascript

    In computer science, linear search or sequential search is a method for finding a particular value in a list that checks each element in sequence until the desired element is found or the list is exhausted. The list need not be ordered.Linear search is ...

  • linear search

    python

    In computer science, linear search or sequential search is a method for finding a particular value in a list that checks each element in sequence until the desired element is found or the list is exhausted. The list need not be ordered.Linear search is ...

  • manhattan distance

    python

    Taxicab geometry, considered by Hermann Minkowski in 19th-century Germany, is a form of geometry in which the usual distance function of metric or Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the ...

  • maximum subarray

    go

    In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. For example, for the sequence of values 2, 1, 3, 4, 1, 2, 1, 5, 4; the contiguous ...

  • maximum subarray

    haskell

    In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. For example, for the sequence of values 2, 1, 3, 4, 1, 2, 1, 5, 4; the contiguous ...

  • maximum subarray

    javascript

    In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. For example, for the sequence of values 2, 1, 3, 4, 1, 2, 1, 5, 4; the contiguous ...

  • maximum subarray

    ruby

    In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. For example, for the sequence of values 2, 1, 3, 4, 1, 2, 1, 5, 4; the contiguous ...

  • maximum subarray

    scala

    In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. For example, for the sequence of values 2, 1, 3, 4, 1, 2, 1, 5, 4; the contiguous ...

  • merge sort

    go

    O(n log n) typical,In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the ...

  • merge sort

    prolog

    O(n log n) typical,In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the ...

  • pollard rho algorithm

    go

    Pollard's rho algorithm is a special-purpose integer factorization algorithm. It was invented by John Pollard in 1975. It is particularly effective for a composite number having a small prime factor.The algorithm is based on Floyd's cycle-finding ...

  • pollard rho algorithm

    javascript

    Pollard's rho algorithm is a special-purpose integer factorization algorithm. It was invented by John Pollard in 1975. It is particularly effective for a composite number having a small prime factor.The algorithm is based on Floyd's cycle-finding ...

  • pollard rho algorithm

    python

    Pollard's rho algorithm is a special-purpose integer factorization algorithm. It was invented by John Pollard in 1975. It is particularly effective for a composite number having a small prime factor.The algorithm is based on Floyd's cycle-finding ...

  • quick sort

    go

    Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order. Developed by Tony Hoare in 1959, with his work published in 1961, it is still a ...

  • quick sort

    prolog

    Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order. Developed by Tony Hoare in 1959, with his work published in 1961, it is still a ...

  • selection sort

    go

    In computer science, selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is ...

  • shell sort

    go

    Shellsort, also known as Shell sort or Shell's method, is an in-place comparison sort. It can be seen as either a generalization of sorting by exchange (bubble sort) or sorting by insertion (insertion sort). The method starts by sorting pairs of ...

  • sieve of eratosthenes

    go

    In mathematics, the sieve of Eratosthenes (AncientGreek: , kskinon Eratosthnous), one of a number of prime number sieves, is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as ...

  • sieve of eratosthenes

    javascript

    In mathematics, the sieve of Eratosthenes (AncientGreek: , kskinon Eratosthnous), one of a number of prime number sieves, is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as ...

  • string to int

    go

    Alvy (also known as Stringtown from the oil boom days c. 1890s - 1910 because the estimated population of 5000 residents and temporary workers were strung over the hills and hollows hence the nickname Stringtown) is an unincorporated community in Tyler ...

  • sudoku

    prolog

    A standard Sudoku puzzle contains 81 cells, in a 9 by 9 grid, and has 9 zones, each zone being the intersection of the first, middle, or last 3 rows, and the first, middle, or last 3 columns. Each cell may contain a number from one to nine; each number ...