← Back to Forge Seeds
Sign In
🌍 Public Flashcards187 ConceptsBy: Alex

Algorithms & Data Structures

Algorithms and Data Structures form the foundational core of computer science and software engineering, governing how information is organized, stored, and manipulated to solve problems efficiently.

#algorithms & data structures

⚡Practice & Mastery Launchers

Launch interactive study modes or print uniform flashcard sheets.

Practicing as guest • Session saved locally on this device
📇
Flashcards PDF
Download uniform 8-card sheets formatted for paper cutting
Deck Mastery Distribution0 / 187 Deep Rooted (0%)
Unplanted (187) Seeded (0) Sprouting (0) Deep Rooted (0)

Deck Vocabulary & Concepts (187)

Review definitions, formulas, and aliases included in this glossary.

Filter by tag:

A*

#
#algorithms & data structures#graph theory

A* is a graph traversal and pathfinding algorithm that finds the shortest path between a starting and ending node. It uses a heuristic function to estimate the cost from the current node to the goal.

Abstract Data Type

#
#algorithms & data structures

A logical description of what a data structure does, specifying the operations that can be performed on data without detailing how those operations are implemented. It focuses on behavior rather than implementation.

Alias:ADT

Acyclic graph

#
#algorithms & data structures#graph theory

A graph that contains no cycles, meaning there is no path that starts and ends at the same vertex without traversing any edge or vertex more than once.

Adjacency List

#
#algorithms & data structures#graph theory

An adjacency list is a common way to represent a graph where each vertex has a list of its adjacent vertices. It is efficient for sparse graphs (graphs with relatively few edges).

Adjacency Matrix

#
#algorithms & data structures#graph theory

An adjacency matrix is a square matrix used to represent a finite graph. The elements of the matrix indicate whether pairs of vertices are adjacent or connected by an edge. It is efficient for dense graphs.

Algorithm

#
#algorithms & data structures

An algorithm is a finite set of well-defined, unambiguous instructions to solve a problem or perform a computation. It acts as a step-by-step procedure to achieve a desired output from a given input.

Ancestors

#
#algorithms & data structures#graph theory

In a tree or graph structure, ancestors of a node are all the nodes on the path from the root to that node, excluding the node itself. They represent the parent, grandparent, and so on.

Arc

#
#algorithms & data structures#graph theory

In graph theory, an arc, also known as an edge, represents a connection or relationship between two nodes (vertices) in a graph. It can be directed or undirected.

Alias:Edge

Array

#
#algorithms & data structures

An array is a linear data structure that stores a collection of elements of the same data type at contiguous memory locations. Elements are accessed using an index.

Association list

#
#algorithms & data structures

An association list, or alist, is a list of pairs where each pair consists of a key and its associated value. It serves as a simple mapping or dictionary data structure.

Alias:Alist

AVL tree

#
#algorithms & data structures

An AVL tree is a self-balancing binary search tree where the height difference between the left and right subtrees of any node is at most one. This property ensures efficient search, insertion, and deletion operations.

B-tree

#
#algorithms & data structures

A B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. It is commonly used in databases and file systems.

Backtracking

#
#algorithms & data structures

Backtracking is a general algorithmic technique for finding all (or some) solutions to computational problems, especially constraint satisfaction problems. It incrementally builds candidates to the solutions and abandons a candidate ('backtracks') as soon as it determines that the candidate cannot possibly be completed to a valid solution.

Balanced tree

#
#algorithms & data structures

A balanced tree is a tree data structure where the heights of the left and right subtrees of any node differ by at most some small constant factor. This property ensures that operations like search, insertion, and deletion remain efficient, typically O(log n).

Bandwidth

#
#algorithms & data structures

In the context of data structures, bandwidth can informally refer to the amount of data that can be transferred or processed within a given time. More broadly, it's the maximum rate of data transfer across a given path.

Base case

#
#algorithms & data structures

In recursion, a base case is a specific condition or input for which the function does not make a recursive call. It provides a direct solution, preventing infinite recursion and ensuring termination.

Big O

#
#algorithms & data structures

Big O notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. In computer science, it's used to classify algorithms by how their running time or space requirements grow as the input size grows.

Alias:Big O notation

Bijective

#
#algorithms & data structures

A bijective function, also known as a one-to-one correspondence, is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other set, and vice versa. It is both injective (one-to-one) and surjective (onto).

Alias:one-to-one correspondence

Binary heap

#
#algorithms & data structures

A binary heap is a tree-based data structure that satisfies the heap property: for a min-heap, the value of each node is greater than or equal to the value of its parent, with the minimum element at the root. For a max-heap, the value of each node is less than or equal to its parent, with the maximum element at the root. It is often implemented as an array.

Binary Search

#
#algorithms & data structures

Binary search is an efficient searching algorithm that works on sorted arrays. It repeatedly divides the search interval in half, eliminating half of the remaining elements in each step until the target is found or the interval is empty.

Binary Search Tree

#
#algorithms & data structures

A tree data structure where each node has at most two children, referred to as the left child and the right child. For every node, all values in its left subtree are less than the node's value, and all values in its right subtree are greater.

Alias:BST

Binary tree

#
#algorithms & data structures

A binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child. This fundamental structure serves as the basis for many other advanced data structures and algorithms.

Binding

#
#algorithms & data structures

In programming, binding refers to the process of associating a name with a value, type, or function. It determines when and how this association occurs, which can be at compile time (static binding) or runtime (dynamic binding).

Binding list

#
#algorithms & data structures

A binding list is a data structure, typically an association list, that stores a collection of name-value pairs, often used to manage variable bindings in an interpreter or compiler. It provides a scope for variable lookup.

Boolean matrix

#
#algorithms & data structures

A Boolean matrix, also known as a binary matrix or logical matrix, is a matrix whose elements are exclusively 0 or 1 (representing false or true). It is often used to represent relationships in graphs or logical operations.

Aliases:Logical matrix, Binary matrix

Boxed number

#
#algorithms & data structures

A boxed number refers to a primitive numeric value (like an integer or float) that has been wrapped or 'boxed' into an object. This is common in languages that distinguish between primitive types and objects, allowing primitives to be treated as objects.

Branching factor

#
#algorithms & data structures

In tree data structures or search algorithms, the branching factor refers to the number of children or successors each node can have. It indicates the degree of a node and influences the complexity of traversing the tree.

Breadth-First Search

#
#algorithms & data structures

A graph traversal algorithm that explores all the neighbor nodes at the present depth before moving on to nodes at the next depth level. It typically uses a queue to manage which node to visit next.

Alias:BFS

Bucket

#
#algorithms & data structures

In data structures, a bucket is a container used to group multiple items that share a common characteristic or hash value. It is often used in hash tables (where it holds collided items) or bucket sort algorithms.

Cache

#
#algorithms & data structures

A cache is a high-speed data storage layer that stores a subset of data, typically transient in nature, so that future requests for that data can be served faster. It improves data retrieval performance and reduces latency.

Cartesian product

#
#algorithms & data structures

The Cartesian product of two sets A and B, denoted A × B, is the set of all possible ordered pairs where the first element is from A and the second element is from B. It is a fundamental operation in set theory and relational algebra.

Child

#
#algorithms & data structures

In a tree data structure, a child is a node that is directly connected to another node (its parent) one level below it. A node can have zero, one, or multiple children, depending on the tree type.

Circular queue

#
#algorithms & data structures

A queue that operates in a circular fashion, where the last position is connected back to the first position. When the queue is full, new elements overwrite the oldest ones, effectively reusing array space.

Circularly linked list

#
#algorithms & data structures

A linked list where the last node points back to the first node, forming a circle. This allows for continuous traversal from any node and simplifies certain operations, like queue implementations.

Class

#
#algorithms & data structures#object-oriented programming

An extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods). It defines the blueprint for objects.

Clustering

#
#algorithms & data structures

The task of grouping a set of objects such that objects in the same group (cluster) are more similar to each other than to those in other groups. It is an unsupervised learning method used for data analysis.

Collision

#
#algorithms & data structures

In hashing, a situation where two distinct keys hash to the same index in a hash table. Collision resolution strategies are needed to handle this effectively.

Comparison

#
#algorithms & data structures

The act of evaluating two items to determine their relative order or equality. It is a fundamental operation in many sorting and searching algorithms.

Cons

#
#algorithms & data structures

In Lisp-like languages, a function that constructs a new pair (or "cons cell") from two arguments. It is fundamentally used to build linked lists and other recursive data structures.

Constructive

#
#algorithms & data structures

An approach to algorithm design where a solution is built step-by-step, guaranteeing a valid solution at each stage. It often refers to algorithms that directly produce the desired output.

Critical path

#
#algorithms & data structures#project management#graph theory

The longest sequence of dependent activities that determines the shortest possible duration to complete the project. Any delay on the critical path directly delays the entire project completion.

Cycle

#
#algorithms & data structures#graph theory

A path that starts and ends at the same vertex, visiting other vertices and edges in between. It implies a closed loop in the graph where traversal returns to the origin.

Data Structure

#
#algorithms & data structures

A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. It defines the relationship between data elements.

Dense graph

#
#algorithms & data structures#graph theory

A graph where the number of edges is close to the maximum possible number of edges for its given number of vertices. Typically, it has O(V^2) edges, where V is the number of vertices.

Depth

#
#algorithms & data structures

In a tree or graph, the length of the path from the root (or a starting node) to a specific node. It measures how far a node is from the top or initial point.

Depth-First Search

#
#algorithms & data structures

A graph traversal algorithm that explores as far as possible along each branch before backtracking. It typically uses a stack or recursion to keep track of nodes to visit.

Alias:DFS

Dereference

#
#algorithms & data structures

The act of accessing the value stored at a memory address pointed to by a pointer or reference. It effectively retrieves the data that the pointer "points to" in memory.

Descendants

#
#algorithms & data structures

In a tree or hierarchical data structure, all the nodes that are in the subtree rooted at a given node. These include the node's children, grandchildren, and all subsequent generations.

Design pattern

#
#algorithms & data structures

A general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be directly transformed into code but a description or template for how to solve a problem.

Destructive

#
#algorithms & data structures

An operation or function that modifies its input data structure in place, rather than creating a new one. This means the original data is altered or overwritten, often to save memory.

Dijkstra's algorithm

#
#algorithms & data structures

An algorithm for finding the shortest paths between nodes in a graph, which may have positive edge weights. It produces a shortest path tree from a single source node to all other reachable nodes.

Directed

#
#algorithms & data structures

Pertaining to a graph where each edge has a specific direction, typically represented by an arrow. Edges only allow traversal in one way, from source to destination.

Directed Acyclic Graph

#
#algorithms & data structures#graph theory

A directed graph that contains no directed cycles, meaning there is no way to start at a vertex and follow a sequence of directed edges back to that same vertex.

Alias:DAG

Discrete event simulation

#
#algorithms & data structures

A type of simulation where the system's state changes only at discrete points in time, called events. It models a system as a sequence of events that occur at specific, distinct times.

Disjoint Set Union

#
#algorithms & data structures

A data structure that keeps track of a set of elements partitioned into a number of disjoint (non-overlapping) subsets. It supports two primary operations: Find (determining which subset an element belongs to) and Union (merging two subsets).

Aliases:DSU, Union-Find

Divide and Conquer

#
#algorithms & data structures

Divide and Conquer is an algorithmic paradigm that involves breaking a problem into smaller subproblems of the same type, solving them recursively, and then combining their solutions to solve the original problem. Examples include Merge Sort and Quick Sort.

Domain

#
#algorithms & data structures

In the context of data structures and algorithms, the set of all possible input values that a function or algorithm can accept. It defines the valid range of inputs.

Doubly linked list

#
#algorithms & data structures

A linear data structure where each node contains not only its own data but also a pointer (or reference) to the next node and a pointer to the previous node in the sequence. This allows traversal in both directions.

Dynamic Programming

#
#algorithms & data structures

Dynamic Programming is a method for solving complex problems by breaking them down into simpler subproblems. It stores the results of subproblems to avoid recomputing them, typically using memoization or tabulation, making it efficient for problems with overlapping subproblems and optimal substructure.

Exclusive or

#
#algorithms & data structures

A logical operator (XOR) that outputs true if and only if its inputs differ (one is true, the other is false). It is a binary operation commonly used in bitwise operations and cryptography.

Alias:XOR

Extendible hashing

#
#algorithms & data structures

A dynamic hashing technique that allows the hash table to grow or shrink as needed, efficiently handling collisions and maintaining high performance. It uses a directory of pointers to buckets, which can split.

Extensible Markup Language

#
#algorithms & data structures

A markup language that defines rules for encoding documents in a format that is both human-readable and machine-readable. It is widely used for data interchange across systems.

Alias:XML

External sort

#
#algorithms & data structures

A sorting algorithm used for data sets too large to fit into main memory, requiring the use of external storage devices like hard drives during the sorting process.

Fair

#
#algorithms & data structures

In the context of resource allocation or scheduling, a property ensuring that all competing processes or users receive an equitable share of resources over a given period, preventing starvation.

Filter

#
#algorithms & data structures

A process or function that selects a subset of data from a larger collection based on predefined criteria, effectively removing or ignoring elements that do not satisfy the specified conditions.

First In, First Out

#
#algorithms & data structures

A processing order where the element that was added first is always the first one to be removed, like a queue.

Alias:FIFO

First-child/Next-sibling

#
#algorithms & data structures

A common strategy for representing general trees where each node stores a pointer to its first child and another pointer to its next sibling, enabling traversal of the hierarchy.

Fold

#
#algorithms & data structures

An operation, also known as reduce or aggregate, that processes a data structure by applying a combining function cumulatively to its elements, reducing them to a single output value.

Garbage

#
#algorithms & data structures

Memory that has been allocated by a program but is no longer referenced or accessible, making it eligible for deallocation and reuse by the system.

Garbage collection

#
#algorithms & data structures

An automatic memory management process that identifies and reclaims memory that is no longer reachable by a program, freeing it up for future allocations and preventing memory leaks.

Alias:GC

Gedanken

#
#algorithms & data structures

A German term for "thought experiment," frequently used in computer science to describe a hypothetical scenario or problem explored conceptually, without requiring actual physical implementation or empirical testing.

Alias:Thought experiment

Geometric series

#
#algorithms & data structures

A sequence of numbers where each term after the first is obtained by multiplying the preceding one by a constant, non-zero value known as the common ratio.

Goal

#
#algorithms & data structures

In the context of problem-solving or search algorithms, the specific desired state, condition, or outcome that the algorithm is designed to reach or achieve.

Grammar

#
#algorithms & data structures#computer science

A formal system of rules that defines the valid combinations of symbols or tokens in a language, specifying its syntax and structure.

Graph

#
#algorithms & data structures#graph theory

A graph is a non-linear data structure consisting of a finite set of vertices (nodes) and a set of edges connecting pairs of vertices. Edges can be directed or undirected, and can have weights.

Graph Traversal

#
#algorithms & data structures#graph theory

The process of visiting (checking and/or updating) each vertex in a graph. The order in which the vertices are visited depends on the specific algorithm used, such as Breadth-First Search (BFS) or Depth-First Search (DFS).

Greedy Algorithm

#
#algorithms & data structures

A greedy algorithm is an algorithmic paradigm that makes the locally optimal choice at each stage with the hope of finding a global optimum. It never reconsiders its choices once made.

Hash Function

#
#algorithms & data structures

A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes. It's crucial for hash tables.

Hash Table

#
#algorithms & data structures

A hash table (or hash map) is a data structure that implements an associative array abstract data type, mapping keys to values. It uses a hash function to compute an index into an array of buckets or slots.

Heap

#
#algorithms & data structures

A heap is a specialized tree-based data structure that satisfies the heap property: for a max-heap, the value of each node is greater than or equal to the value of its children; for a min-heap, it's less than or equal. It is often implemented as an array.

Heuristic

#
#algorithms & data structures

A technique or rule of thumb that aims to find a good, but not necessarily optimal, solution to a problem, especially when an exhaustive search is computationally infeasible.

Heuristic search

#
#algorithms & data structures

A search algorithm that employs a heuristic function to estimate the cost or desirability of different paths, guiding the search process towards promising solutions rather than exhaustively exploring all options.

Immutable

#
#algorithms & data structures

A property of an object or data structure signifying that its internal state cannot be altered or changed once it has been initialized or created.

In-place

#
#algorithms & data structures

An algorithm that transforms its input data using only a small, constant amount of auxiliary memory space, typically modifying the input directly without requiring additional significant memory allocation.

Injective

#
#algorithms & data structures

A function is injective, or one-to-one, if each distinct element in its domain maps to a unique, distinct element in its codomain, meaning no two inputs share the same output.

Inorder

#
#algorithms & data structures

A specific tree traversal strategy for binary trees where nodes are visited in the order: left subtree, then the root node, and finally the right subtree.

Interior node

#
#algorithms & data structures

In a tree data structure, any node that has one or more child nodes, distinguishing it from a leaf node which has no children.

Internal sort

#
#algorithms & data structures

A sorting algorithm designed to process data sets that fit entirely within the computer's main memory, performing all operations without needing external storage.

Intersection

#
#algorithms & data structures#set theory

The intersection of two or more sets is a new set composed only of the elements that are present in all of the original sets.

Intractable

#
#algorithms & data structures

Describes problems for which no efficient algorithm is known to exist, meaning their computational time typically grows exponentially with the input size, rendering them practically unsolvable for large instances.

Iteration

#
#algorithms & data structures

A programming technique that repeatedly executes a block of code until a certain condition is met. It typically uses loops (e.g., for, while) to process elements or perform repetitive tasks.

Iterator

#
#algorithms & data structures

An object that provides a standardized way to traverse elements within a collection sequentially, abstracting away the collection's internal structure and allowing access to each item.

Last-In, First-Out

#
#algorithms & data structures

A principle where the last element added to a collection is the first one to be removed. This behavior is characteristic of a stack data structure.

Alias:LIFO

Latency

#
#algorithms & data structures

The time delay between the initiation of a request or an operation and the start of its corresponding response or execution by the system.

Leaf

#
#algorithms & data structures

A node in a tree data structure that has no children and therefore no outgoing edges to other nodes. It represents an endpoint in the tree's branches.

Linear

#
#algorithms & data structures

Describes a data structure where elements are arranged in a sequential order, one after another, like an array or a linked list. Accessing elements often involves traversing this sequence.

Linear Search

#
#algorithms & data structures

Linear search (or sequential search) is a simple searching algorithm that sequentially checks each element of a list until a match is found or the entire list has been searched. It works on unsorted lists.

Link

#
#algorithms & data structures

A reference or pointer within a data structure that connects one node to another, forming relationships and enabling traversal. It's fundamental in structures like linked lists and trees.

Linked List

#
#algorithms & data structures

A linked list is a linear data structure where elements are not stored at contiguous memory locations. Instead, each element (node) contains data and a pointer to the next node.

Load factor

#
#algorithms & data structures

A measure of how full a hash table is, calculated as the number of elements divided by the total number of available buckets. It helps determine when to resize the table to maintain performance.

Map

#
#algorithms & data structures

An abstract data type that stores key-value pairs, where each unique key is associated with exactly one value. It allows efficient retrieval of a value given its key.

Mapping

#
#algorithms & data structures

The process of establishing a correspondence between elements of two sets, often associating a key with a value in a dictionary or hash table. It defines how input relates to output.

Master

#
#algorithms & data structures#distributed systems#parallel computing

The central node, process, or data structure responsible for orchestration, authoritative state management, and workload distribution.

Aliases:master theorem, Primary, Leader, Coordinator, Controller

Max queue

#
#algorithms & data structures

A variation of a priority queue where the element with the highest priority (or maximum value) is always at the front and is the first to be dequeued. It efficiently retrieves the largest item.

Memory hierarchy

#
#algorithms & data structures

A multi-level organization of computer memory, ranging from small, fast, and expensive memory (like CPU caches) to large, slow, and cheap memory (like hard drives). It optimizes data access speed.

Memory locality

#
#algorithms & data structures

A principle describing the tendency of a processor to access the same set of memory locations repetitively (temporal locality) or to access memory locations that are physically close to each other (spatial locality). It improves cache performance.

Merge

#
#algorithms & data structures

The operation of combining two or more sorted lists or data structures into a single, new sorted list. It's a fundamental step in algorithms like merge sort.

Merge Sort

#
#algorithms & data structures

Merge Sort is a divide-and-conquer sorting algorithm that works by recursively dividing an array into two halves, sorting each half, and then merging the sorted halves back together. It has a stable O(N log N) time complexity.

Min queue

#
#algorithms & data structures

A variation of a priority queue where the element with the lowest priority (or minimum value) is always at the front and is the first to be dequeued. It efficiently retrieves the smallest item.

Minimum spanning tree

#
#algorithms & data structures#graph theory

A subgraph of an undirected, weighted graph that connects all the vertices with the minimum possible total edge weight, without forming any cycles. It's commonly found using Prim's or Kruskal's algorithm.

Node

#
#algorithms & data structures

A fundamental unit in many data structures like trees, graphs, and linked lists, typically containing data and references (links) to other nodes. It represents an entity or point.

Null dereference

#
#algorithms & data structures

An error that occurs when a program attempts to access the memory location pointed to by a null pointer. This usually results in a program crash or undefined behavior.

Object

#
#algorithms & data structures#object-oriented programming

An instance of a class in object-oriented programming, encapsulating data (attributes) and methods (behaviors) that operate on that data. It represents a real-world entity.

On-line

#
#algorithms & data structures

Describes an algorithm that processes its input piece by piece as it arrives, without having access to the entire input beforehand. It often needs to make decisions based on partial information.

One-to-one

#
#algorithms & data structures

A relationship between two sets where each element in the first set is associated with exactly one unique element in the second set, and vice versa. Also known as an injection.

Onto

#
#algorithms & data structures

A relationship (or function) where every element in the codomain (the "output" set) is mapped to by at least one element in the domain (the "input" set). Also known as a surjection.

Ontology

#
#algorithms & data structures

A formal representation of knowledge as a set of concepts within a domain and the relationships between those concepts. It provides a shared vocabulary for data and information.

Operator

#
#algorithms & data structures

A symbol or keyword that performs an operation on one or more values (operands) to produce a result. Examples include arithmetic, logical, and comparison operators.

Parent

#
#algorithms & data structures

In a tree or graph data structure, a node that has one or more child nodes directly connected below it. It is an ancestor of its children.

Parsing

#
#algorithms & data structures

The process of analyzing a string of symbols, like source code or a data file, to determine its grammatical structure according to a formal grammar. It converts raw input into a structured representation.

Path

#
#algorithms & data structures

In a graph or tree, a sequence of connected edges that links two nodes. It represents a route from a starting node to a destination node.

Pattern

#
#algorithms & data structures

A regular, discernible form or sequence that can be recognized and used for matching, searching, or describing data. It is fundamental in pattern recognition and regular expressions.

Pattern variable

#
#algorithms & data structures

A variable declared within a pattern-matching construct (e.g., a `switch` expression or `if` statement) that extracts a value from the matched input and makes it available for use.

Pivot

#
#algorithms & data structures

An element chosen in certain sorting algorithms (like Quicksort) around which the other elements are partitioned. Elements smaller than the pivot go to one side, and larger ones to the other.

Pointer

#
#algorithms & data structures

A variable that stores the memory address of another variable or a data structure. It allows indirect access to data and is crucial for dynamic memory management.

Postorder

#
#algorithms & data structures

A tree traversal method where the left subtree is visited first, then the right subtree, and finally the root node itself. This is often used for deleting nodes or evaluating expressions.

Predicate

#
#algorithms & data structures

A function or expression that returns a boolean value (true or false) based on its input. It is commonly used for filtering, testing conditions, or making decisions in algorithms.

Preorder

#
#algorithms & data structures

A tree traversal method where the root node is visited first, followed by a recursive traversal of its left subtree and then its right subtree. It's often used to create a prefix expression of an expression tree.

Priority Queue

#
#algorithms & data structures

A priority queue is an abstract data type similar to a regular queue or stack, but where each element has a 'priority'. Elements with higher priority are served before elements with lower priority. It is typically implemented using a heap.

Quadratic

#
#algorithms & data structures

Refers to an algorithm's time complexity where its running time grows proportionally to the square of the input size (O(n^2)). This typically indicates less efficient performance for large inputs.

Queue

#
#algorithms & data structures

A queue is a linear data structure that follows the First-In, First-Out (FIFO) principle. Elements are added at one end (rear) and removed from the other end (front).

Quick Sort

#
#algorithms & data structures

Quick Sort is a highly efficient, in-place, divide-and-conquer sorting algorithm. It picks an element as a pivot and partitions the array around the pivot, placing all smaller elements before it and all greater elements after it, then recursively sorts the sub-arrays.

Random access

#
#algorithms & data structures

The ability to access any element in a sequence or data structure directly and in constant time, regardless of its physical location or the order of previous accesses. Arrays provide random access.

Randomized algorithm

#
#algorithms & data structures

An algorithm that makes some choices randomly, often to achieve good performance in expectation or to simplify the algorithm. Quicksort with random pivot selection is an example.

Range

#
#algorithms & data structures

A continuous set of values or elements within a larger collection, often defined by a starting and ending point. It's frequently used in queries or array slicing.

Recursion

#
#algorithms & data structures

Recursion is a programming technique where a function calls itself directly or indirectly to solve a problem. It breaks down a problem into smaller, self-similar subproblems until a base case is reached.

Recursive case

#
#algorithms & data structures

The part of a recursive function that makes a call to itself with a modified, typically smaller, version of the original problem. This step moves towards the base case.

Red-Black tree

#
#algorithms & data structures

A self-balancing binary search tree that maintains balance by enforcing specific properties on the colors (red or black) of its nodes. This guarantees logarithmic time complexity for insertions, deletions, and lookups.

Reduce

#
#algorithms & data structures

An operation that applies a function to a sequence of elements and accumulates the results into a single output value. It's often used for aggregation, like summing or finding a maximum.

Reference

#
#algorithms & data structures

A value that refers to or points to the memory location of another value or object. It allows multiple variables to access and modify the same underlying data.

Reference type

#
#algorithms & data structures

A data type whose variables store references to objects in memory, rather than the objects themselves. Changes made through one reference are visible through all others.

Rehash

#
#algorithms & data structures

The process of rebuilding a hash table with a larger capacity and re-inserting all existing key-value pairs. This is done to maintain performance when the load factor becomes too high.

Root

#
#algorithms & data structures

The topmost node in a tree data structure, which has no parent. It serves as the starting point for most tree traversals and operations.

Row-major order

#
#algorithms & data structures

A method of storing multi-dimensional arrays in linear memory where elements of each row are stored contiguously. The rightmost index varies fastest.

Runtime stack

#
#algorithms & data structures

A data structure used by operating systems and programming languages to manage function calls. It stores local variables, return addresses, and parameters for active function invocations.

Scalability

#
#algorithms & data structures

The ability of a system, network, or process to handle a growing amount of work or its potential to be enlarged to accommodate that growth. It often relates to performance under increasing load.

Scope

#
#algorithms & data structures

The region of a computer program where a declared name (like a variable or function) is valid and can be referenced. It determines the visibility and lifetime of identifiers.

Search

#
#algorithms & data structures

The process of finding a specific item or a set of items that meet certain criteria within a collection of data. Common methods include linear and binary search.

Searching Algorithm

#
#algorithms & data structures

A searching algorithm is an algorithm for finding an item with specified properties from a collection of items. It determines whether an element is present and, if so, its location.

Sentinel

#
#algorithms & data structures

A special value or object placed at the beginning or end of a data structure to simplify boundary conditions in algorithms, such as search or traversal loops. It avoids special checks for empty lists.

Set difference

#
#algorithms & data structures

An operation that returns a set containing all elements that are in the first set but not in the second set. It is denoted as A - B or A \ B.

Shadow

#
#algorithms & data structures

Occurs when a variable declared in an inner scope has the same name as a variable in an outer scope, effectively hiding the outer variable within the inner scope.

Shortest path

#
#algorithms & data structures#graph theory

The path between two nodes in a graph such that the sum of the weights of its constituent edges is minimized. Dijkstra's and Bellman-Ford algorithms find shortest paths.

side-effect

#
#algorithms & data structures

Any observable change to the state of a system that occurs outside the local scope of a function or expression. This includes modifying global variables, I/O operations, or altering arguments passed by reference.

Simple path

#
#algorithms & data structures#graph theory

A path in a graph that does not repeat any vertices (and therefore no edges), except possibly for the start and end vertices if it's a cycle.

Slack

#
#algorithms & data structures

The buffer time a task can be delayed or suspended without causing it—or the entire schedule—to miss a deadline.

Aliases:Laxity, Float

Slave

#
#algorithms & data structures#distributed systems#parallel computing

A subordinate node, process, or thread designed to execute tasks assigned by the master, mirror authoritative state, or process sub-problems in parallel.

Aliases:Worker, Follower, Replica, Agent

Sort

#
#algorithms & data structures

The process of arranging elements of a list or array in a specific order, such as numerical, lexicographical, or by some custom criterion. Examples include quicksort and mergesort.

Sorting Algorithm

#
#algorithms & data structures

A sorting algorithm is an algorithm that puts elements of a list in a certain order, such as numerical or lexicographical order. It rearranges data based on a comparison operator.

Space Complexity

#
#algorithms & data structures

Space complexity measures the amount of memory an algorithm uses as a function of the length of the input. It includes both auxiliary space and the space used by the input itself.

Sparse array

#
#algorithms & data structures

An array where most elements hold a default or zero value, making it inefficient to store all positions explicitly. Specialized representations only store non-default elements, saving significant memory.

Sparse graph

#
#algorithms & data structures#graph theory

A graph where the number of edges is significantly less than the maximum possible, typically O(V) or O(V log V) edges. These graphs are efficiently represented using adjacency lists rather than matrices.

Spatial locality

#
#algorithms & data structures

A principle stating that if a memory location is accessed, it is highly probable that nearby memory locations will be accessed soon. This property is exploited by caching mechanisms to improve performance.

Splay tree

#
#algorithms & data structures

A self-balancing binary search tree that automatically moves recently accessed nodes closer to the root through a series of "splay" operations. This ensures frequently accessed items are quicker to find over time.

Stable

#
#algorithms & data structures

A property of a sorting algorithm where elements with equal values maintain their original relative order in the sorted output. This is crucial when elements carry additional associated data.

Stack

#
#algorithms & data structures

A stack is a linear data structure that follows the Last-In, First-Out (LIFO) principle. Elements can only be added (pushed) or removed (popped) from one end, called the top.

Stack frame

#
#algorithms & data structures

A block of memory allocated on the call stack for each active function call, containing local variables, function arguments, and the return address. It is pushed on call and popped on return.

Stack space

#
#algorithms & data structures

The portion of memory reserved for the call stack, used to store function call information like local variables, parameters, and return addresses. Exceeding this limit results in a stack overflow error.

State

#
#algorithms & data structures

The set of all current values of variables, registers, and memory locations within a system or program at a particular point in time. It defines the system's condition and influences its future behavior.

Structure sharing

#
#algorithms & data structures

A technique where multiple data structures or parts of them refer to the same underlying memory locations to save space and avoid redundant copying. Common in persistent data structures and functional programming.

Successor

#
#algorithms & data structures

In a sorted sequence or tree, the successor of a given element is the smallest element that is strictly greater than it. Finding the successor is a common operation in binary search trees.

Surjective

#
#algorithms & data structures

A property of a function where every element in the codomain (target set) is mapped to by at least one element from the domain (input set). Such a function is also commonly called "onto".

Symbol table

#
#algorithms & data structures

A data structure used by compilers and interpreters to store information about identifiers (like variable names, function names) in a program. It maps names to their attributes like type, scope, and memory location.

Tail recursive

#
#algorithms & data structures

A recursive function where the recursive call is the very last operation performed, with no further computations needed in the current stack frame. Compilers can optimize this into an iterative loop.

Taxonomy

#
#algorithms & data structures

A hierarchical classification system used to categorize concepts, objects, or organisms into groups based on shared characteristics. It helps organize complex information into a structured tree-like form.

Temporal locality

#
#algorithms & data structures

A principle stating that if a particular memory location is accessed, it is highly probable that the same memory location will be accessed again in the near future. This is commonly exploited by CPU caches.

Time Complexity

#
#algorithms & data structures

Time complexity measures the amount of time taken by an algorithm to run as a function of the length of the input. It quantifies the number of operations performed by the algorithm.

Topological sort

#
#algorithms & data structures

An ordering of vertices in a directed acyclic graph (DAG) such that for every directed edge U -> V, U appears before V in the ordering. It is used to schedule tasks with dependencies.

Tree

#
#algorithms & data structures

A tree is a non-linear, hierarchical data structure consisting of nodes connected by edges. It has a root node and child nodes, with no cycles, forming a parent-child relationship.

Tree rotation

#
#algorithms & data structures

An operation in a binary search tree that changes its structure while preserving the BST property, primarily used to rebalance the tree and maintain height efficiency. It involves local rearrangements of nodes.

Trie

#
#algorithms & data structures

A Trie (prefix tree) is a tree-like data structure used to store a dynamic set or associative array where keys are usually strings. It efficiently retrieves keys based on their prefixes.

Undirected

#
#algorithms & data structures#graph theory

A property of a graph where edges have no specific direction, meaning if an edge connects vertex A and vertex B, travel is possible in both directions. Such edges are typically represented as (A, B).

Union

#
#algorithms & data structures

In set theory, the union of two or more sets is a new set containing all distinct elements that are present in at least one of the original sets. It combines elements without duplication.

Unparsing

#
#algorithms & data structures

The process of converting an abstract syntax tree (AST) or other internal representation of a program back into its concrete textual source code form. It is essentially the reverse of parsing.

Vertex

#
#algorithms & data structures#graph theory

A fundamental component of a graph, also known as a node, representing an entity or a point. Vertices are connected by edges, which represent relationships or connections between them.

Weight

#
#algorithms & data structures#graph theory

A numerical value assigned to an edge or vertex in a graph, typically representing cost, distance, capacity, or priority. Weights are crucial for algorithms like shortest path or minimum spanning tree.

Well-founded ordering

#
#algorithms & data structures

A binary relation on a set such that there are no infinite descending chains of elements. This property is essential for proving termination of algorithms and defining recursive functions without loops.