The Computer Science Glossary collects foundational computer science concepts that come up often in Python work but aren’t unique to Python. These are the language-agnostic ideas that sit beneath the code you write, the kind of vocabulary that connects everyday Python work to the broader field.
It’s a quick reference for beginners shoring up the fundamentals and for experienced developers who want a precise definition, or just a proper name for something they’ve used for years.
Not sure which term you need? Describe what you’re trying to do, and Mentor AI will point you to the right entries.
abstract data type (ADT)A model of a data structure defined by the operations it supports and their behavior, not its implementation.
algorithmA finite sequence of well-defined steps that takes zero or more inputs and produces one or more outputs to solve a problem.
A* search algorithmA pathfinding algorithm that finds the lowest-cost path between two nodes by combining the cost already traveled with a heuristic estimate of the rest.
big endianA byte order in which the most significant byte of a multi-byte value is stored or transmitted first.
Big O notationA mathematical notation for how an algorithm’s running time or memory use grows as its input size increases.
binary heapA complete binary tree that keeps its smallest or largest element at the root, used to implement priority queues and heapsort.
binary searchAn efficient algorithm for finding a target value in a sorted sequence by repeatedly halving the search range.
binary search tree (BST)A binary tree that keeps its keys in sorted order, letting a search discard half the remaining nodes at each step.
binary treeA hierarchical data structure in which each node has at most two children, a left child and a right child.
bitmaskAn integer whose individual bits act as on/off flags, used with bitwise operators to store, set, and test many options inside a single value.
breadth-first search (BFS)An algorithm that traverses a graph level by level, visiting all of a vertex’s neighbors before moving deeper.
bubble sortA comparison sorting algorithm that repeatedly steps through a list, swapping adjacent elements that are out of order.
bucket sortA sorting algorithm that distributes elements into ordered buckets, sorts each bucket, then concatenates them back into one fully sorted sequence.
cachingA technique that keeps copies of data or computed results in fast storage so that repeated requests for the same items are served quickly.
call stackA stack data structure that tracks the active function calls in a running program, storing each call’s local variables and return address until it returns.
Cascading Style Sheets (CSS)A declarative style sheet language that describes how documents written in a markup language such as HTML are presented on screen and in print.
central limit theorem (CLT)A statistical theorem stating that the average of many independent random samples tends toward a normal distribution, whatever the original data’s shape.
circular dependencyA relationship in which two or more modules, classes, or packages depend on one another in a cycle, tightening coupling and complicating loading and testing.
code smellA surface indication in source code that usually points to a deeper design problem, even though the code still runs correctly.
complete binary treeA binary tree in which every level except possibly the last is completely filled, with the last level’s nodes packed as far left as possible.
cooperative multitaskingA scheduling approach in which each task keeps the CPU until it voluntarily yields control, so the operating system never interrupts it.
counting sortA non-comparison sorting algorithm that orders integer keys by counting how often each value appears, running in linear time when the key range is small.
critical sectionA section of code that only one process or thread may execute at a time, protecting a shared resource from concurrent access.
CRUDAn acronym for the four basic operations of persistent storage: create, read, update, and delete, performed by nearly every data-driven application.
daemon threadA background thread that a program never waits on before exiting, so once only daemon threads remain, the runtime ends and stops them abruptly.
dependency injection (DI)A technique in which an object receives its dependencies from an outside source instead of creating them itself, which loosens coupling and aids testing.
depth-first search (DFS)An algorithm that traverses a graph or tree by exploring each branch as far as possible before backtracking.
dequeA linear data structure that supports adding and removing elements at both of its ends, generalizing the stack and the queue.
design patternA general, reusable solution to a recurring software design problem, expressed as an adaptable template rather than finished code to copy.
Dijkstra’s algorithmAn algorithm that finds the shortest paths from a source node to all others in a weighted graph with non-negative edge weights.
distributed systemA collection of independent computers that coordinate over a network to act as a single coherent system.
dynamic programming (DP)A method for solving a problem by breaking it into overlapping subproblems, solving each once, and reusing the stored results.
dynamic typingA form of type checking in which the types of a program’s values are verified while it runs, rather than before execution.
Elvis operatorA shorthand binary operator that returns its left operand when that operand is truthy, otherwise evaluating and returning the right one.
endianness (byte order)A convention for ordering the bytes of a multi-byte value in memory or during transmission, either most significant or least significant byte first.
environment variable (env var)A named value that a process reads at runtime to configure a program, locate resources, or pass in secrets.
fully qualified name (FQN)A name that identifies a program element unambiguously by including the full path of enclosing namespaces, packages, or modules.
function signatureA combination of a function’s name and parameters, plus their types in statically typed languages, that specifies how the function is called.
glob patternA string whose wildcard characters match a set of filenames or paths, used to select files by name in shells and programs.
graphA data structure of vertices connected by edges, used to model networks such as roads, dependencies, or links.
hashmapA data structure that stores key-value pairs and looks up a value by its key in average constant time, usually built on a hash table.
hash tableA data structure that maps keys to values and supports fast lookup by computing an array index from each key.
hexadecimalA base-16 number system that represents values with the digits 0-9 and the letters A-F, used as a compact shorthand for binary data.
HTTP methodA request keyword that tells a server what action a client wants to perform on a resource, such as GET to read data or POST to create it.
hypothesis testingA formal statistical method for deciding whether sample data provides enough evidence to reject a default assumption about a population.
IEEE 754A technical standard that defines how computers represent and calculate with floating-point numbers.
insertion sortA simple sorting algorithm that builds a sorted sequence one element at a time, inserting each value into its correct place among those sorted so far.
integration testA test that exercises several software modules together to verify they work correctly once combined, checking the interfaces and data between them.
ISO 8601An international standard for writing dates and times as text ordered from largest to smallest unit, making timestamps unambiguous and sortable.
lazy evaluationAn evaluation strategy that delays computing a value until it is actually needed, avoiding work whose result the program never uses.
lexicographic orderAn ordering of sequences that compares elements position by position, generalizing alphabetical order to any rankable symbols.
linked listA linear data structure whose elements are chained together by references rather than stored contiguously.
LinuxA family of free and open source, Unix-like operating systems built around the Linux kernel, widely used on servers, the cloud, and embedded devices.
little endianA byte order that stores the small end of a number first, placing the least significant byte of a multibyte value at the lowest memory address.
markup languageA system of tags embedded in plain text to describe a document’s structure, meaning, or presentation.
memoizationAn optimization technique that stores a function’s result against its arguments, so repeat calls return the stored value instead of recomputing it.
memory leakA defect in which a program keeps holding memory it no longer needs, causing its memory use to grow steadily the longer it runs.
merge sortA stable, comparison-based sorting algorithm that splits a sequence in half, sorts each half, and merges them back together in O(n log n) time.
metadataA form of data that describes other data, such as a file’s size and timestamps, a photo’s camera settings, or a database table’s column types.
min heapA tree-based data structure in which every parent is no larger than its children, so the smallest element always sits at the root.
multithreadingA concurrency model where a single process runs multiple threads that share the same memory space.
mutex (mutual exclusion)A synchronization primitive that allows only one thread or process at a time to access a shared resource or critical section.
newline-delimited JSON (NDJSON)A text format that stores one JSON value per line, so programs can stream, append, and process records one at a time.
overloadingA form of polymorphism where one name, such as a function or operator, has multiple implementations chosen by the arguments’ number and types.
overridingA mechanism in object-oriented programming where a subclass redefines an inherited method to replace or extend its behavior.
Pascal caseA naming convention that joins words without separators and capitalizes the first letter of every word, including the first, as in PascalCase.
preemptive multitaskingA CPU scheduling approach in which the operating system can interrupt a running task to give the CPU to another, without the task’s cooperation.
Prim’s algorithmA greedy algorithm that builds a minimum spanning tree of a weighted graph by repeatedly adding the cheapest edge that reaches a new vertex.
priority queueAn abstract data type that serves elements by priority rather than insertion order, always removing the highest-priority item first.
pseudocodeAn informal, language-agnostic way of describing the steps of an algorithm in plain, human-readable terms rather than runnable code.
quicksortA divide-and-conquer sorting algorithm that partitions data around a pivot and sorts each side in place, running in O(n log n) time on average.
quick sortA divide-and-conquer sorting algorithm that orders a collection by recursively partitioning it around a chosen pivot element.
race conditionA concurrency bug in which a program’s outcome depends on the unpredictable timing of threads or processes that access shared state.
reentrantA property of code that can be safely interrupted partway through and entered again before an earlier call finishes, because each call keeps its own state.
registry patternA design pattern that stores objects in a central lookup table keyed by name, so code can find a component without holding a direct reference to it.
regression testingA software-testing practice that re-runs previously passing checks after a change to confirm existing behavior still works and no prior feature has broken.
rounding errorA discrepancy between a number’s exact value and the finite-precision approximation a computer stores or computes, which can accumulate across operations.
runtimeA program’s execution environment, such as a Python interpreter, that runs the code, manages memory, and mediates access to the operating system.
scriptA short program written to be run directly by an interpreter, typically to automate a task or glue programs together.
selection sortAn in-place sorting algorithm that repeatedly selects the smallest remaining element and moves it into its sorted position.
semaphoreA synchronization primitive that uses a counter to limit how many threads or processes can access a shared resource at once.
sentinel valueA special value an algorithm treats as a signal rather than data, most often to mark the end of a sequence or terminate a loop.
separation of concerns (SoC)A design principle that divides a program into distinct sections, each handling a single concern, to improve modularity and maintainability.
set unionA set operation that combines two or more sets into one set containing every element that appears in at least one of them.
signed integerA whole number that can store negative, zero, or positive values, using part of its binary encoding to record the sign.
singletonA design pattern that restricts a class to a single shared instance, reached through one global access point.
software development kit (SDK)A vendor-supplied bundle of libraries, tools, documentation, and sample code for building applications on a specific platform.
SOLID principlesA set of five object-oriented design principles that keep code easier to understand, extend, and maintain by reducing coupling between its parts.
sorting algorithmAn algorithm that arranges the elements of a sequence into a defined order, such as ascending or descending.
space complexityA measure of how much memory an algorithm needs as the size of its input grows.
spec-driven development (SDD)A software development approach in which a written specification, not the code, is the source of truth that drives the implementation.
static code analysisAn examination of a program without executing it, working from its source code, an intermediate representation, or its compiled binaries, to detect bugs, security vulnerabilities, style violations, and other statically visible properties.
static typingA form of type checking in which the types of a program’s expressions and variables are verified before execution, usually at compile time.
stderrAn output stream that programs use for diagnostic and error messages, separate from normal output so the two can be redirected and processed independently.
stdinA process’s default input stream, conventionally connected to the keyboard or a redirected source.
stdoutA byte stream that a process uses to write its conventional output, separate from diagnostic messages and input.
subtypingA relation between data types where any value of the subtype can be used wherever a value of the related supertype is expected.
syntactic sugarProgramming language syntax designed to improve readability or convenience without changing what the language can compute.
test caseA specification of inputs, preconditions, and expected results used to verify a software requirement or exercise a particular code path.
test fixtureA fixed initial state of data, objects, or environment that a software test relies on to produce repeatable results.
test runnerA tool that discovers, executes, and reports on automated tests within a codebase.
time complexityA measure of how an algorithm’s running time grows as the size of its input increases.
TimsortA hybrid, stable sorting algorithm that combines merge sort and insertion sort, used as Python’s built-in sort to exploit order already in the data.
Tom’s Obvious Minimal Language (TOML)A configuration file format that combines human-readable syntax with an unambiguous mapping to a hash table of keys and typed values.
topological sortA linear ordering of a directed graph’s vertices in which every vertex comes before the ones its edges point to, valid only when the graph has no cycles.
UTF-8A variable-width character encoding that stores each Unicode code point in one to four bytes, dominant on the web and the default in Python.
YAMLA human-readable data serialization format that uses indentation to structure nested data, widely used for configuration files.