JavaScript Algorithms

The JavaScript algorithms collection includes implementations and examples of popular algorithms in ES6. Algorithmic snippets are primarily a learning resource, as they might already be implemented natively or require optimizations to run in production.

  • Hamming distance

    Calculates the Hamming distance between two values.

    JavaScript, Math · Dec 28, 2020

  • Binomial coefficient

    Calculates the number of ways to choose k items from n items without repetition and without order.

    JavaScript, Math · Dec 28, 2020

  • Factorial of number

    Calculates the factorial of a number.

    JavaScript, Math · Dec 28, 2020

  • Distance between two points

    Calculates the distance between two points.

    JavaScript, Math · Dec 28, 2020

  • Number is prime

    Checks if the provided integer is a prime number.

    JavaScript, Math · Jan 12, 2021