Skip to content

Repository files navigation

Algorithms

MaintenanceGitHub repo sizeStatic BadgeStatic BadgePRs WelcomeContributor Covenant


This is yet another place where various algorithms live.

The main focus was made on algorithms themselves, so you can find their implementations in different programming languages (mostly Python, TypeScript and Go). Each algorithm to the much extent possible is provided with the necessary description, including its asymptotic complexity and memory consumption.

You and/or your company could use it as a source for coding skills assessment during technical interview process, as an additional resource for self-preparation or just as a source for your own awesome algorithms collection.

Content

TypeProblem
Number theory🔗
Sum of binary strings
Primality test
Sieve of Eratosthenes
Greatest common divisor (GCD)
Digital root
GamesSudoku solver (backtracking)
Strings🔗
PalindromesCheck if a given string is a palindrome
PalindromesCheck if a given string is a potential palindrome
PermutationsGenerate all possible balanced bracket sequences of N pairs
PermutationsGenerate all possible permutations of string letters (recursion)
PermutationsReverse vowels
BracketsCheck correctness of a given bracket sequence (one bracket type)
BracketsCheck correctness of a given bracket sequence (multiple bracket types)
BracketsDetermine the maximum depth of nesting brackets in a given sequence
BracketsGenerate all possible balanced bracket sequences of N pairs
BracketsTotal amount of correct bracket sequences for N bracket pairs
BracketsNext Bracket Sequence
SearchBoyer–Moore–Horspool (Horspool's) algorithm
SearchKnuth–Morris–Pratt (KMP) algorithm
SearchRabin–Karp (Karp-Rabin) algorithm
Find substring pattern in a given string (needle in haystack)
Sum strings
Sequences🔗
Implementation of Boyer–Moore majority vote algorithm
Lists🔗
Arrays/SubsetsGenerate Power set of given array
ArraysCheck if an array has a pair of numbers whose sum is match the given target
Linked ListsFind a middle/median element
Parsers🔗
ConversionsConvert an integer to a roman numeral
Trees🔗
BinaryCheck if there is a node in binary tree which satisfies to given predicate
Dynamic Programming🔗
Coin Change (Change-making): find the least number of coins
Coin Change (Change-making): find the total number of ways (order matters)
Coin Change (Change-making): get coins of the least number of coins
All possible pathways in given square matrix from one cell to another
Max possible earn among all pathways from point A to B in given square matrix
Data Structures🔗
Circular Buffer (Ring Buffer)
Singly Linked List
Doubly Linked List
Binary Heap

Links

Contributing

We encourage you to contribute to our growing knowledge base of algorithmic world! Please check out the Contribution Guide for guidelines about how to proceed. In any activity in the project, please, follow our Code of Conduct.

License

This project is available under the Unlicense license or, in simple words, doesn't contain any restrictions on usage.

About

This is yet another place where various algorithms live.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages