The little & not so little data structures and algorithms. Coded by
Grinzzly
This repository contains JavaScript based examples of many popular algorithms and data structures.
Each algorithm and data structure has its own separate README with related explanations and links for source.
A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.
- Linked List
- Doubly Linked List
- Stack
- Heap
- Queue
- Priority Queue
- Hash Table
- Trie
- Tree
- Graph
- Bloom Filter
- Disjoint Set (Union Find)
An algorithm is an unambiguous specification of how to solve a class of problems. It is a set of rules that precisely define a sequence of operations.
- Mathematical Algorithms
- Factorial
- Fibonacci Numbers
- Euclidean Algorithm (GCD) - calculate the Greatest Common Divisor (GCD)
- Least Common Multiple (LCM)
- Primality Test - check whether number is prime or not
- Pascal Triangle
- Sieve of Eratosthenes - finding all prime numbers up to any given limit
- Fast Powering
- Integer Partition
- Integer Partition
- Radians - radians and degrees conversions
- Sorting Algorithms
- Searches
- Linked List
- Graphs
- Breadth First Search (BFS)
- Depth First Search (DFS)
- Dijkstra Algorithm - finding shortest paths from single vertex
- Kruskal Algorithm - finding Minimum Spanning Tree (MST) for weighted undirected graph
- Bellman-Ford Algorithm - finding shortest paths to all graph vertices from given one
- Longest Common Substring
- Strings
- Hamming Distance - amount of positions at which the symbols are different
- Levenshtein Distance - difference between two sequences
- Knuth–Morris–Pratt Algorithm (KMP Algorithm) - substring search (pattern matching)
- Z Algorithm - finds occurrences of a word
- Sets
- Cartesian Product - product of multiple sets
- Cryptography