# Algorithms

> The sequence of steps or instructions designed to solve a specific problem or perform a certain operation.

Learning level of Wonderium.dev with 93 cards. HTML version: https://wonderium.dev/algorithms. Last updated: 2026-11-25.

## Basics

- [Complexity Analysis](https://wonderium.dev/algorithms/complexity-analysis.md): The Complexity Analysis concept in Algorithms evaluates the efficiency of an algorithm by measuring its time and space usage for different input sizes.
- [Algorithm Analysis](https://wonderium.dev/algorithms/algorithm-analysis.md): The Algorithm Analysis is a process that examines algorithmic efficiency, focusing on runtime and memory needs across varying input sizes.
- [Divide and Conquer](https://wonderium.dev/algorithms/divide-and-conquer.md): The Divide and Conquer approach in Algorithms solves problems by recursively breaking them into subproblems, combining solutions for efficiency.
- [Data Structure](https://wonderium.dev/algorithms/data-structure.md): The Data Structure is a concept focused on efficient data access, storage and modification during computations.
- [Array](https://wonderium.dev/algorithms/array.md): The Array data structure organizes elements in a contiguous memory block for indexed access and efficient traversal.
- [Hash Table](https://wonderium.dev/algorithms/hash-table.md): The Hash Table is a data structure that stores key-value pairs and uses a hash function to find them quickly.
- [Linked List](https://wonderium.dev/algorithms/linked-list.md): The Linked List is a data structure that stores a sequential collection of nodes, each linking to the next for efficient insertions and deletions.
- [Stack](https://wonderium.dev/algorithms/stack.md): The Stack is a LIFO (last-in, first-out) data structure, commonly used for depth-first search and backtracking algorithms.
- [Queue](https://wonderium.dev/algorithms/queue.md): The Queue is a FIFO (first-in, first-out) data structure, commonly used for breadth-first search and task scheduling algorithms.
- [Tree](https://wonderium.dev/algorithms/tree.md): The Tree data structure is a hierarchical model for representing parent-child relationships, used in organizing data hierarchically.
- [Graph](https://wonderium.dev/algorithms/graph.md): The Graph is a data structure that models relationships between entities through nodes and edges, ideal for networked data.
- [Matrix](https://wonderium.dev/algorithms/matrix.md): The Matrix is a data structure that arranges elements in rows and columns for operations on two-dimensional data.
- [String](https://wonderium.dev/algorithms/string.md): The String data structure represents sequences of characters, commonly used in text processing.
- [Subset](https://wonderium.dev/algorithms/subset.md): The Subset concept involves generating smaller groups of elements from a larger set, used in combinatorial problems.
- [Greedy Algorithms](https://wonderium.dev/algorithms/greedy-algorithms.md): The Greedy Algorithms is a type of algorithms that picks the best local choice at each step, which gives a globally optimal result only for some problems.
- [Parallel Algorithms](https://wonderium.dev/algorithms/parallel-algorithms.md): The Parallel Algorithms is a type of algorithms that divide tasks to run concurrently, improving processing speed for large computations.

## Complexity Analysis

- [Time Complexity](https://wonderium.dev/algorithms/time-complexity.md): The Time Complexity concept in Algorithms measures the runtime efficiency of an algorithm as input size increases.
- [Space Complexity](https://wonderium.dev/algorithms/space-complexity.md): The Space Complexity concept in Algorithms evaluates the memory usage of an algorithm relative to input size.
- [Big O](https://wonderium.dev/algorithms/big-o.md): The Big O notation in Algorithms describes an asymptotic upper bound on how an algorithm's time or space grows with input size.
- [O(1)](https://wonderium.dev/algorithms/o-1.md): The O(1) constant time complexity in Algorithms indicates an operation that completes in the same amount of time regardless of input size.
- [O(log n)](https://wonderium.dev/algorithms/o-log-n.md): The O(log n) logarithmic time complexity in Algorithms describes an operation whose time grows proportionally to the logarithm of the input size.
- [O(n)](https://wonderium.dev/algorithms/o-n.md): The O(n) linear time complexity in Algorithms represents an operation that scales directly with input size.
- [O(n log n)](https://wonderium.dev/algorithms/o-n-log-n.md): The O(n log n) linearithmic time complexity in Algorithms describes operations that scale as input size times its logarithm.
- [O(n^2)](https://wonderium.dev/algorithms/o-n-2.md): The O(n^2) quadratic time complexity in Algorithms signifies an operation that grows with the square of the input size.
- [O(2^n)](https://wonderium.dev/algorithms/o-2-n.md): The O(2^n) exponential time complexity in Algorithms describes processes where time doubles with each increase in input size.
- [O(n!)](https://wonderium.dev/algorithms/o-n-factorial.md): The O(n!) factorial time complexity in Algorithms indicates operations that multiply runtime with each new input element.
- [Big Omega](https://wonderium.dev/algorithms/big-omega.md): The Big-Ω (Omega) notation in Algorithms describes an asymptotic lower bound, meaning a function grows at least as fast as the given rate.
- [Big Theta](https://wonderium.dev/algorithms/big-theta.md): The Big-θ (Theta) notation in Algorithms describes a tight bound, where a function grows at the same rate as another, bounded both above and below.

## Search Algorithms

- [Binary Search](https://wonderium.dev/algorithms/binary-search.md): The Binary Search is an algorithm that finds an element's position in a sorted array by repeatedly dividing the search range in half.
- [Modified Binary Search](https://wonderium.dev/algorithms/modified-binary-search.md): The Modified Binary Search is an algorithm that adapts binary search logic for specific conditions or constraints in data search.
- [Quick Select](https://wonderium.dev/algorithms/quick-select.md): The Quick Select is an algorithm that efficiently finds the k-th smallest or k-th largest element in an unsorted array using partition-based logic.
- [Nearest Neighbor](https://wonderium.dev/algorithms/nearest-neighbor.md): The Nearest Neighbor is a technique for finding the closest point to a given point in a dataset, often in spatial data analysis.

## Graph Algorithms

- [Breadth-First Search](https://wonderium.dev/algorithms/breadth-first-search.md): The Breadth-First Search (BFS) is an algorithm that explores nodes level by level in a graph or tree, used for shortest-path and connectivity problems.
- [Depth-First Search](https://wonderium.dev/algorithms/depth-first-search.md): The Depth-First Search (DFS) is an algorithm that explores nodes as deeply as possible along branches before backtracking, ideal for pathfinding.
- [Dijkstra's Algorithm](https://wonderium.dev/algorithms/dijkstra-algorithm.md): The Dijkstra's Algorithm computes the shortest path from a source node to all other nodes in a graph with non-negative weights.
- [Bellman-Ford Algorithm](https://wonderium.dev/algorithms/bellman-ford-algorithm.md): The Bellman-Ford Algorithm is an algorithm that calculates the shortest path from a single source node, handling graphs with negative edge weights.
- [Topological Sort](https://wonderium.dev/algorithms/topological-sort.md): The Topological Sort is an algorithm that orders nodes of a directed acyclic graph linearly, respecting dependencies.
- [Kahn's Algorithm](https://wonderium.dev/algorithms/kahns-algorithm.md): The Kahn's Algorithm implements topological sorting for directed acyclic graphs by iteratively removing nodes with no incoming edges.

## Sorting Algorithms

- [Comparison Sort](https://wonderium.dev/algorithms/comparison-sort.md): The Comparison Sort is a type of algorithms that sort elements by comparing pairs to determine their order.
- [Quick Sort](https://wonderium.dev/algorithms/quick-sort.md): The Quick Sort Algorithm sorts an array by recursively partitioning elements around a pivot, achieving efficient average performance.
- [Selection Sort](https://wonderium.dev/algorithms/selection-sort.md): The Selection Sort is an algorithm that sorts a list by repeatedly finding the smallest element and placing it in sorted order.
- [Bubble Sort](https://wonderium.dev/algorithms/bubble-sort.md): The Bubble Sort is an algorithm that sorts a list by repeatedly swapping adjacent elements to place larger values later.
- [Counting Sort](https://wonderium.dev/algorithms/counting-sort.md): The Counting Sort is an algorithm that sorts elements by counting occurrences, efficient for integers in a known range.
- [Bucket Sort](https://wonderium.dev/algorithms/bucket-sort.md): The Bucket Sort is an algorithm that sorts elements by distributing them into buckets, sorting each bucket individually.
- [Merge Sort](https://wonderium.dev/algorithms/merge-sort.md): The Merge Sort is an algorithm that divides a list into halves, recursively sorting and merging them to create a sorted list.

## Inefficient Sorting Algorithms

- [Miracle Sort](https://wonderium.dev/algorithms/miracle-sort.md): The Miracle Sort is a fictional sorting algorithm that assumes elements magically sort themselves without any operations.
- [Thanos Sort](https://wonderium.dev/algorithms/thanos-sort.md): The Thanos Sort is a joke sorting algorithm that removes half of an unsorted list until the remaining elements are in order.
- [Stalin Sort](https://wonderium.dev/algorithms/stalin-sort.md): The Stalin Sort is a satirical sorting algorithm that removes any element that is out of order to create a sorted list.
- [Bogo Sort](https://wonderium.dev/algorithms/bogo-sort.md): The Bogo Sort is an algorithm that randomly shuffles elements until the list happens to be sorted.
- [Bozo Sort](https://wonderium.dev/algorithms/bozo-sort.md): The Bozo Sort is an algorithm that randomly swaps two elements until the list is sorted, making it an inefficient and impractical method.
- [Perm Sort](https://wonderium.dev/algorithms/perm-sort.md): The Perm Sort is an algorithm that tests every possible permutation of elements until finding a sorted sequence, resulting in a highly inefficient sort.
- [Stooge Sort](https://wonderium.dev/algorithms/stooge-sort.md): The Stooge Sort Algorithm is a recursive sorting method that sorts the first two-thirds, then the last two-thirds, then the first two-thirds of a list again.

## Array

- [One-Dimensional Array](https://wonderium.dev/algorithms/one-dimensional-array.md): The One-Dimensional Array is a linear data structure that stores elements in a single row, accessible by index.
- [Multi-Dimensional Array](https://wonderium.dev/algorithms/multi-dimensional-array.md): The Multi-Dimensional Array is a data structure that stores elements in multiple dimensions, such as 2D grids or 3D matrices.
- [Dynamic Array](https://wonderium.dev/algorithms/dynamic-array.md): The Dynamic Array is a data structure that represents a resizable array, which grows or shrinks as elements are added or removed.
- [Memory Reservation](https://wonderium.dev/algorithms/memory-reservation.md): The Memory Reservation involves allocating a block of memory in advance for later use, often used to improve performance and manage resources efficiently.

## Hash Table

- [Chaining Method](https://wonderium.dev/algorithms/chaining-method.md): The Chaining Method is a technique where each bucket in a hash table stores a linked list of all elements that hash to the same index.
- [Open Addressing](https://wonderium.dev/algorithms/open-addressing.md): The Open Addressing is a collision resolution technique where all elements are stored in the hash table itself and a collision uses the next free bucket.
- [Hash Function](https://wonderium.dev/algorithms/hash-function.md): The Hash Function is a mathematical function that takes an input (or 'key') and produces a fixed-size output, typically used to index data in a hash table.
- [Double Hashing](https://wonderium.dev/algorithms/double-hashing.md): The Double Hashing is a collision resolution method that uses two hash functions to calculate the next available bucket for a collided element.
- [Open Bucket Hashing](https://wonderium.dev/algorithms/open-bucket-hashing.md): The Open Bucket Hashing is a variation of open addressing where each bucket holds a list of elements, so several elements can share one index.
- [Collision](https://wonderium.dev/algorithms/collision.md): The Collision concept describes the event when two keys map to the same hash value in a hash table.

## Linked List

- [Singly Linked List](https://wonderium.dev/algorithms/singly-linked-list.md): The Singly Linked List is a linear sequence data structure of nodes where each node points to the next, forming a unidirectional link.
- [Doubly Linked List](https://wonderium.dev/algorithms/doubly-linked-list.md): The Doubly Linked List is a data structure where each node points to both its previous and next node, enabling two-way traversal.
- [Circular Linked List](https://wonderium.dev/algorithms/circular-linked-list.md): The Circular Linked List is a data structure where the last node points to the first, forming a circular chain.
- [Circular Doubly Linked List](https://wonderium.dev/algorithms/circular-doubly-linked-list.md): The Circular Doubly Linked List is a data structure that links each node to both its previous and next nodes, with the last node connecting back to the first.

## Tree

- [Node](https://wonderium.dev/algorithms/node.md): The Node in data structures represents a basic unit containing data and links to other nodes, forming structures like linked lists and trees.
- [Binary Tree](https://wonderium.dev/algorithms/binary-tree.md): The Binary Tree is a hierarchical tree data structure where each node has at most two children, often called left and right.
- [Binary Search Tree](https://wonderium.dev/algorithms/binary-search-tree.md): The Binary Search Tree is a data structure that organizes nodes so that each left subtree has smaller values and right subtree has larger values.
- [AVL Tree](https://wonderium.dev/algorithms/avl-tree.md): The AVL Tree is a self-balancing binary search tree data structure where each node maintains a balanced height, ensuring O(log n) operations.
- [Red-Black Tree](https://wonderium.dev/algorithms/red-black-tree.md): The Red-Black Tree is a self-balancing binary search tree data structure with nodes assigned red or black, ensuring a balanced structure.
- [B-Tree](https://wonderium.dev/algorithms/b-tree.md): The B-Tree is a self-balancing tree data structure commonly used in databases and file systems, allowing efficient multi-level search.
- [B+ Tree](https://wonderium.dev/algorithms/b-plus-tree.md): The B+ Tree is an extension of B-Tree data structure, with all values stored in leaf nodes and internal nodes holding keys only.
- [Max Heap](https://wonderium.dev/algorithms/max-heap.md): The Max Heap is a complete binary tree data structure where each parent node is greater than or equal to its child nodes.
- [Min Heap](https://wonderium.dev/algorithms/min-heap.md): The Min Heap is a complete binary tree data structure where each parent node is less than or equal to its child nodes.
- [Suffix Tree](https://wonderium.dev/algorithms/suffix-tree.md): The Suffix Tree is a compressed trie of all suffixes of a text, optimized for fast substring searches.
- [Trie](https://wonderium.dev/algorithms/trie-prefix-tree.md): The Trie (Prefix Tree) is a tree data structure used for efficient prefix-based searches, storing sequences like strings.

## Graph

- [Edge](https://wonderium.dev/algorithms/edge.md): The Edge in Graph Theory is a connection between two vertices, representing relationships or paths in a graph.
- [Vertex](https://wonderium.dev/algorithms/vertex.md): The Vertex in Graph Theory is a fundamental element of a graph, representing a point where edges meet.
- [Directed Graph](https://wonderium.dev/algorithms/directed-graph.md): The Directed Graph is a graph where edges have a direction, indicating the flow from one vertex to another.
- [Undirected Graph](https://wonderium.dev/algorithms/undirected-graph.md): The Undirected Graph is a graph where edges don't have direction, meaning the connection between vertices is bidirectional.
- [Weighted Graph](https://wonderium.dev/algorithms/weighted-graph.md): The Weighted Graph is a graph where each edge has a value (weight) that represents a cost, distance or capacity.
- [Unweighted Graph](https://wonderium.dev/algorithms/unweighted-graph.md): The Unweighted Graph is a graph where edges have no weights, meaning all connections are considered equal.
- [Acyclic Graph](https://wonderium.dev/algorithms/acyclic-graph.md): The Acyclic Graph is a graph that contains no cycles, meaning no path leads back to the same vertex.
- [Cyclic Graph](https://wonderium.dev/algorithms/cyclic-graph.md): The Cyclic Graph is a graph that contains one or more cycles, where a path starts and ends at the same vertex.

## Various

- [Factorial](https://wonderium.dev/algorithms/factorial.md): The Factorial is the result of multiplying all positive integers less than or equal to a given number, denoted as n!
- [Fibonacci](https://wonderium.dev/algorithms/fibonacci.md): The Fibonacci is a series of numbers where each number is the sum of the two preceding ones, starting from 0 and 1.
- [Two Pointers](https://wonderium.dev/algorithms/two-pointers.md): The Two Pointer in Algorithms is a technique where two pointers are used to traverse a data structure, often to find pairs or solve problems efficiently.
- [Sliding Window](https://wonderium.dev/algorithms/sliding-window.md): The Sliding Window in Algorithms is a technique where a subset of elements in a collection is processed and moved over the collection.
- [Backtracking](https://wonderium.dev/algorithms/backtracking.md): The Backtracking is an algorithm for finding solutions to problems by exploring all possibilities and abandoning those that don't work.
- [Top K Elements](https://wonderium.dev/algorithms/top-k-elements.md): The Top K Elements is a problem that involves selecting the k largest or smallest elements from a collection, often using algorithms like heaps or quickselect.
- [Brute Force](https://wonderium.dev/algorithms/brute-force.md): The Brute Force is a simple algorithm that tries all possible solutions to find the correct one, often inefficient for large datasets.
- [Recursion](https://wonderium.dev/algorithms/recursion.md): The Recursion in Algorithms is a technique that involves a function calling itself to solve smaller instances of a problem.
