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

Insertion Sort

Published by Eko Spt 1 min read
Sorts an array of numbers, using the insertion sort algorithm.

bucketSort

Published by Eko Spt 1 min read
Sorts an array of numbers, using the bucket sort algorithm.

Caesar Cipher

Published by Eko Spt 1 min read
Encrypts or decrypts a given string using the Caesar cipher.

kNearestNeighbors

Published by Eko Spt 1 min read
Classifies a data point relative to a labelled data set, using the k-nearest neighbors algorithm.

kMeans

Published by Eko Spt 1 min read
Groups the given data into `k` clusters, using the k-means clustering algorithm.

permutations

Published by Eko Spt 1 min read
Generates all permutations of an array's elements (contains duplicates).

quickSort

Published by Eko Spt 1 min read
Sorts an array of numbers, using the quicksort algorithm.

luhnCheck

Published by Eko Spt 1 min read
Implementation of the Luhn Algorithm used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers etc.

selection Sort

Published by Eko Spt 1 min read
Sorts an array of numbers, using the selection sort algorithm.