Data Structures – Exam Review Vocabulary

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/70

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering the key data-structure and algorithm concepts present in the lecture notes. They include definitions, properties, and typical complexities to aid exam preparation.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

71 Terms

1
New cards

Insertion Sort

Comparison‐based sort that scans from left to right, inserting each element into its correct position among the already-sorted prefix; runs in Θ(n²) worst case, Θ(n) when array is almost sorted, and is in-place and stable.

2
New cards

Merge Sort

Divide-and-conquer comparison sort that recursively splits the array, sorts halves, then merges; runs in Θ(n log n) worst case, is stable, but not in-place (needs Θ(n) extra space).

3
New cards

Heap Sort

Sort that first builds a max-heap in Θ(n) time and repeatedly extracts the maximum into the end of the array; in-place, Θ(n log n) worst case, not stable.

4
New cards

Quick Sort

Recursive divide-and-conquer sort that partitions around a pivot so smaller keys precede it; average Θ(n log n), worst Θ(n²); in-place, not stable.

5
New cards

Pivot (Quick Sort)

Element chosen each partitioning step; its quality determines Quick-Sort’s running time—median yields Θ(n log n), extreme value yields Θ(n²).

6
New cards

Partition Procedure

Linear Θ(n) subroutine that rearranges an array so that elements < pivot come first, pivot is placed, and elements > pivot follow.

7
New cards

Stable Sort

Sorting algorithm that preserves the relative order of keys with equal value (e.g., Merge Sort, Counting Sort).

8
New cards

In-Place Algorithm

Algorithm that sorts or processes data using only O(1) or O(log n) extra memory (e.g., Heap Sort, Quick Sort).

9
New cards

Counting Sort

Linear-time stable sort for n integers in range 0…k−1; uses two auxiliary arrays C(k) and B(n); runs in Θ(n+k).

10
New cards

Radix Sort

Sorts integers by processing d digits least-significant to most-significant with a stable inner sort (often Counting Sort); runs in Θ(d(n+k)).

11
New cards

Bucket Sort

Linear expected-time sort for n real numbers assumed uniformly distributed in (0,1]; places items into n buckets, sorts each bucket, concatenates.

12
New cards

Comparison-Based Sort

Family of sorts whose decisions are based only on key comparisons; has Ω(n log n) lower bound in worst case.

13
New cards

Adjacency Matrix

|V|×|V| boolean matrix where entry (i,j)=1 iff edge (i,j) exists; O(V²) space; O(1) edge lookup, O(V) neighbour scan.

14
New cards

Adjacency List

Array of |V| linked lists, each storing neighbours of a vertex; O(V+E) space; neighbour scan O(deg(v)); edge check O(deg(v)).

15
New cards

Breadth-First Search (BFS)

Graph traversal using a queue; discovers vertices in increasing distance (edges) from source; runs in Θ(V+E).

16
New cards

Depth-First Search (DFS)

Graph traversal that explores as deep as possible along each branch before backtracking; uses recursion or stack; Θ(V+E).

17
New cards

Tree Edge (DFS)

Edge that first discovers a new vertex during DFS and becomes part of the DFS forest.

18
New cards

Back Edge

DFS edge from a vertex to one of its ancestors; indicates a cycle in undirected graphs.

19
New cards

Forward Edge

DFS edge from a vertex to a descendant already discovered (in directed graphs only).

20
New cards

Cross Edge

DFS edge connecting vertices in different subtrees or branches; neither tree, back, nor forward edge.

21
New cards

Topological Sort

Ordering of vertices of a DAG so every directed edge (u,v) goes from earlier to later; obtained by DFS finishing-time decreasing order.

22
New cards

Minimum Spanning Tree (MST)

Subset of edges connecting all vertices with minimum total weight; contains |V|−1 edges and may not be unique.

23
New cards

Safe Edge

Edge that can be added to a partial MST without violating minimality—does not create a cycle with chosen edges.

24
New cards

Kruskal’s Algorithm

Greedy MST algorithm: sort edges by weight, repeatedly add lightest edge that connects two different components using Union-Find; runs in Θ(E log V).

25
New cards

Union–Find (Disjoint Set Forest)

Data structure supporting Make-Set, Find-Set, and Union with near-constant amortized time using union-by-rank and path compression.

26
New cards

Prim’s Algorithm

Greedy MST algorithm that grows a tree from an arbitrary root by repeatedly adding the lightest edge crossing the current cloud; binary-heap version runs in Θ(E log V).

27
New cards

Binary Heap

Array-based complete binary tree satisfying heap property (parent ≥ children for max-heap); supports insert, extract-max/min in Θ(log n).

28
New cards

Max-Heapify

Subroutine that fixes a single node violating the max-heap property by bubbling it down; Θ(log n).

29
New cards

Extract-Min / Extract-Max

Heap operation removing and returning root, then heapifying; Θ(log n).

30
New cards

Binary Search Tree (BST)

Binary tree where left subtree keys < node < right subtree keys; supports search, insert, delete in Θ(h) where h is height.

31
New cards

Inorder Traversal

BST traversal visiting Left–Node–Right; outputs keys in sorted order.

32
New cards

AVL Tree

Self-balancing BST where heights of left and right subtrees differ by ≤1 at every node; guarantees Θ(log n) operations.

33
New cards

Rotation (AVL)

Constant-time local restructuring (single or double) used to restore AVL balance after insert/delete.

34
New cards

B-Tree

Multi-way balanced search tree optimized for disks; each node holds between t−1 and 2t−1 keys; all leaves at same depth.

35
New cards

Minimum Degree t (B-Tree)

Parameter controlling B-Tree node capacity; each non-root node stores at least t−1 keys and at most 2t−1.

36
New cards

SplitChild (B-Tree)

Operation that splits a full child during insertion: middle key moves up, child divided into two nodes.

37
New cards

Hash Table

Dictionary using a hash function h(k) to map keys to buckets; expected Θ(1) search/insert/delete under uniform hashing.

38
New cards

Load Factor (α)

n/m, the average number of keys per bucket; determines expected performance of hash tables.

39
New cards

Chaining (Hashing)

Collision resolution storing all keys that hash to same index in a linked list; expected Θ(1+α) search time.

40
New cards

Open Addressing

Collision resolution that stores all keys inside the table itself, probing alternative slots when collisions occur.

41
New cards

Linear Probing

Open addressing strategy that scans sequentially (h(k)+i) mod m for first empty slot; suffers from clustering.

42
New cards

Quadratic Probing

Open addressing that probes h(k)+c₁i+c₂i² mod m; reduces primary clustering but still limited permutations.

43
New cards

Double Hashing

Open addressing that uses second hash g(k) as probe step: h(k)+i·g(k) mod m; provides up to m permutations, minimal clustering.

44
New cards

Skip List

Probabilistic layered linked lists where each element appears in higher levels with probability ½; expected Θ(log n) search, insert, delete.

45
New cards

Linked List

Sequence of nodes where each points to the next; supports O(1) insert/delete at known position, O(n) search.

46
New cards

Queue

FIFO abstract data type supporting enqueue at rear and dequeue from front; can be array or linked list.

47
New cards

Stack

LIFO abstract data type supporting push and pop at top; array or linked list implementation.

48
New cards

Amortized Analysis

Technique that averages the running time of an operation over a sequence, giving tighter bounds than worst-case per operation.

49
New cards

Priority Queue

ADT storing elements with keys, supporting insert and extract-max/min; often implemented with heaps.

50
New cards

Disjoint Set (Set of Disjoint Sets)

Collection of non-overlapping sets with Make-Set, Union, and Find operations; enables cycle detection in Kruskal.

51
New cards

Union by Rank

Heuristic that attaches the shorter (or lower rank) tree under the taller one during Union to limit height.

52
New cards

Path Compression

Find-Set heuristic that flattens tree structure by making each traversed node point directly to root.

53
New cards

Randomized-Select

Quickselect algorithm picking random pivots to find the i-th order statistic in expected Θ(n) time.

54
New cards

Deterministic Select (Median-of-Medians)

Selection algorithm grouping by fives to choose good pivot; guarantees Θ(n) worst-case time.

55
New cards

Bucket (Hash/Sort)

Container used to collect keys that share a property (same hash value or range) before further processing.

56
New cards

Node Depth

Number of edges from the root to the node in a tree.

57
New cards

Tree Height

Maximum depth among all nodes; height of an empty tree is −1.

58
New cards

Full Binary Tree

Binary tree where every node has either 0 or 2 children.

59
New cards

Perfect Binary Tree

Binary tree that is both full and all leaves are at the same depth.

60
New cards

Heap Sort Worst-Case Time

Always Θ(n log n) because each of n extracts costs Θ(log n).

61
New cards

Counting Sort Complexity

Θ(n+k) time and Θ(n+k) space, linear when k=O(n).

62
New cards

Radix Sort Complexity

Θ(d(n+k)) where d is number of digits and k base size; linear when d and k are O(1) wrt n.

63
New cards

Bucket Sort Assumption

Inputs are uniformly distributed over (0,1] (or known finite range) so expected bucket sizes are constant.

64
New cards

BFS Complexity

Visits each vertex and edge once: Θ(V+E).

65
New cards

DFS Complexity

Also Θ(V+E) since each edge explored once.

66
New cards

Skip List Expected Complexity

Search, insert, delete run in Θ(log n) on average; space O(n).

67
New cards

Hash Table Expected Search Time

Under uniform hashing, Θ(1) average for both successful and unsuccessful searches when α=O(1).

68
New cards

Heap Operations Complexity

Insert and extract-max/min Θ(log n); peek Θ(1); build-heap Θ(n).

69
New cards

Prim with Binary Heap

Runs in Θ(E log V) using binary heap for priority queue of vertex keys.

70
New cards

Kruskal Complexity

Θ(E log E) for sorting plus near-linear Union-Find operations; simplifies to Θ(E log V).

71
New cards

Dijkstra’s Algorithm

Shortest-path algorithm for non-negative weights using a priority queue; binary-heap implementation runs in Θ(E log V).