Skip to content

confused-Techie/Algorithm-Collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Algorithm Collection

This is a simple collection of algorithms, written in as many languages as possible, for use in different software projects.

This collection has been contributed by the community, written myself from the base algorithm, borrowed, modified, or improved from other sources.

It exists to help other programmers implement these algorithms into their own code, learn or do whatever they need to with them.

It's goal is to make utilizing these algorithms as simply as possible.

Contributing:

When contributing feel free to add your algorithm to the read me if not already present, otherwise add it under the 'Uses' section.

Otherwise after writing the code for the algorithm source, ensure to add some JSDoc syntax comments at the start of the file. Indicating the license, and creator. This license is then to be respected in any further use of your contribution.

The MIT license may be a good choice for these snippets, as its a short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

For an example of the JSDoc Syntax that may be best to use, feel free to use the first algorithm added to this project JavaScript - Longest Common Subsequence as an example.

Collection of Algorithms

Levenshtein Distance:

The Levenshtein Distance is a string metric for measuring the difference between two sequences. Named after Vladimir Levenshtein, who considered this distance in 1965.

Levenshtein Distance Formula

Uses:
  • Spell Checkers
  • Correction for optical character recognition
  • Natural-language translation based on translation memory.
Code:

Longest Common Subsequence:

The Longest Common Subsequence (LCS) problem is the problem of finding the longest subsequence common to all sequences in a set of sequences (often just two sequences).

Longest Common Subsequence Formula

Uses:
  • Linux diff utility
  • Git revision control system
Code:

Smith-Waterman:

The Smith-Waterman Algorithm performs local sequence alignment, for determining similar regions between two strings.

Smith-Waterman Algorithm Animated Example

Uses:
  • Determining similar regions between two sequences of nucleic acid sequences.
  • Determining similar regions between two sequences of protein sequences.
Code:

Levenshtein Distance w/ Word Seperators - Double Mean:

TODO:

About

Simple Collection of Algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published