| Subarray | A contiguous run of elements taken from an array |
| Subsequence | Elements picked from a sequence in their original order, not necessarily next to each other |
| Substring | A contiguous run of characters taken from a string |
| Subset | Any selection of elements from a collection, where order does not matter |
| Permutation | One possible ordering of every element in a collection |
| Combination | A selection of k elements where order does not matter |
| Monotonic | Always moving in one direction: never decreasing or never increasing |
| Circular Array | An array whose last element is treated as next to its first |
| In-Place | Changing the input directly instead of building a new copy |
| Partition | Splitting a collection into groups by a rule, such as around a pivot |
| Pivot | The element a partition is built around, as in quicksort |
| Two Pointers | Two indices that move through the data to avoid nested loops |
| Sliding Window | A range of the input that grows and shrinks as it moves forward |
| Prefix Sum | An array where each entry is the total of all elements up to that point |
| Kadane's Algorithm | A linear scan for the largest sum of any subarray |
| Hash Map | A structure mapping keys to values with average O(1) lookups |
| Hash Set | A collection of unique keys with average O(1) membership checks |
| Collision | Two different keys hashing to the same bucket |
| Stack | A last in, first out collection |
| Queue | A first in, first out collection |
| Deque | A queue that allows adding and removing at both ends |
| Monotonic Stack | A stack kept in sorted order by popping values that break the order |
| Linked List | Nodes where each one points to the next |
| Doubly Linked List | A linked list whose nodes point both forward and backward |
| Dummy Node | A placeholder node at the head of a list that simplifies edge cases |
| Fast and Slow Pointers | Two pointers moving at different speeds, used to find cycles or midpoints |
| Binary Tree | A tree where each node has at most two children |
| Binary Search Tree | A binary tree whose left subtree holds smaller values and right subtree larger values |
| Balanced Tree | A tree whose subtree heights differ by at most one at every node |
| Complete Tree | A tree filled level by level, with the last level filled from the left |
| Leaf | A tree node with no children |
| Root | The topmost node of a tree |
| Height | The number of edges on the longest path from a node down to a leaf |
| Depth | The number of edges from the root down to a node |
| Lowest Common Ancestor | The deepest node that has both given nodes in its subtree |
| Trie | A tree of characters used for fast prefix lookups |
| Heap | A complete tree where each parent is ordered before its children |
| Priority Queue | A queue that always hands out the highest priority item next |
| Graph | A set of vertices connected by edges |
| Vertex | A single point or node in a graph |
| Edge | A connection between two vertices |
| Directed Graph | A graph whose edges point one way |
| Weighted Graph | A graph whose edges carry a cost or distance |
| Adjacency List | A map from each vertex to the vertices it connects to |
| Adjacency Matrix | An n by n grid marking which vertices are connected |
| Indegree | The number of edges pointing into a vertex |
| Outdegree | The number of edges leaving a vertex |
| Cycle | A path that starts and ends at the same vertex |
| DAG | A directed acyclic graph: directed edges and no cycles |
| Connected Component | A group of vertices that can all reach one another |
| Depth First Search | Exploring one path as deeply as possible before backing up |
| Breadth First Search | Exploring a graph level by level with a queue |
| Multi-Source BFS | A BFS that starts from several sources at the same time |
| Topological Sort | An ordering of a DAG where every edge points forward |
| Union Find | A structure that tracks which elements belong to the same group |
| Dijkstra's Algorithm | Finds shortest paths in a graph with non-negative weights |
| Minimum Spanning Tree | The cheapest set of edges that connects every vertex |
| Recursion | A function solving a problem by calling itself on smaller inputs |
| Base Case | The input a recursive function answers without calling itself |
| Call Stack | The stack of function calls waiting for their results |
| Backtracking | Building candidates step by step and undoing choices that fail |
| Pruning | Skipping branches of a search that cannot lead to an answer |
| Dynamic Programming | Solving a problem by combining saved answers to overlapping subproblems |
| Memoization | Caching the results of recursive calls |
| Tabulation | Filling a table of answers from the base cases upward |
| Overlapping Subproblems | The same smaller problem being solved more than once |
| Optimal Substructure | An optimal answer built from optimal answers to smaller problems |
| Greedy Algorithm | Making the best local choice at each step |
| Divide and Conquer | Splitting a problem into parts, solving each, and combining the results |
| Binary Search | Halving a sorted search space on every step |
| Stable Sort | A sort that keeps equal elements in their original order |
| Time Complexity | How running time grows as the input grows |
| Space Complexity | How extra memory grows as the input grows |
| Amortized | The average cost per operation over a long sequence of operations |
| Brute Force | Trying every possibility, usually the first solution to improve on |
| Edge Case | An unusual input such as an empty array or a single element |