Algorithms and Data Structures Lecture Review

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/49

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering algorithm analysis, growth rates, data structures, recursion, sorting, searching, and hash tables based on lecture notes.

Last updated 11:31 PM on 6/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

50 Terms

1
New cards

Algorithms Analysis

A methodology that measures the growth rate of resource needs (time and memory) as data size increases, specifically calculating how much more resource is consumed to process n+1n+1 pieces of data.

2
New cards

Time Resource (Measurement)

Measured by counting the number of operations performed, assuming that every individual operation has an identical time cost.

3
New cards

Memory Resource (Measurement)

Calculated by evaluating variable declarations and dynamically allocated memory instead of tracking operation counts.

4
New cards

Abstract Data Type (ADT)

Defines what a collection does and its properties without specifying how it is coded (e.g., List, Table).

5
New cards

Data Structure

The concrete underlying representation (e.g., Array, Linked List, Hash Table) used to implement an Abstract Data Type (ADT).

6
New cards

Constant Growth Rate O(1)O(1)

A growth rate where resource needs do not increase with data size, represented by a flat horizontal line.

7
New cards

Logarithmic Growth Rate O(log(n))O(\text{log}(n))

A growth rate where resource needs grow by one unit every time the data volume doubles; the curve flattens as data grows.

8
New cards

Linear Growth Rate O(n)O(n)

A growth rate where resource usage and data size are directly proportional, forming a non-horizontal straight line.

9
New cards

Loglinear Growth Rate O(nlog(n))O(n \text{log}(n))

A growth rate represented by a curved line where the curve is more pronounced for lower data values than higher ones.

10
New cards

Quadratic Growth Rate O(n2)O(n^2)

A growth rate described mathematically by a parabola.

11
New cards

Cubic Growth Rate O(n3)O(n^3)

A growth rate that looks similar to a quadratic curve but grows significantly faster.

12
New cards

Exponential Growth Rate O(2n)O(2^n)

A growth rate where every additional unit of data requires a doubling of resources, shooting up to near-vertical.

13
New cards

Formal Big-O Definition

T(n)T(n) is O(f(n))O(f(n)) if and only if for some constants cc and n0n_0, T(n) \text{\textle} cf(n) for all n \text{\textge} n_0.

14
New cards

Omega (\text{\textOmega})

Asymptotic notation used to indicate a lower bound.

15
New cards

Theta (\text{\textTheta})

Asymptotic notation used to represent an exact bound.

16
New cards

Little-o (oo)

Asymptotic notation that defines an upper bound that will never actually be reached.

17
New cards

Dominating Term

The single term in a polynomial expression that grows so fast that all other terms and constants become insignificant as nn scales up.

18
New cards

Polynomial Form (Analysis Step 4)

The standard mathematical expression represented as T(n) = a_xn^x + a_{x-1}n^{x-1} + \text{\textdots} + a_1n + a_0.

19
New cards

Recurrence Relation

A mathematical formula used in recursive function analysis to express the operation count of a recursive step (e.g., T(n)=6+T(n1)T(n) = 6 + T(n-1)).

20
New cards

List ADT

A sequence of values characterized by an ordering, where there is an explicit first and second item, regardless of whether the values themselves are sorted.

21
New cards

Random Access (Array vs Linked List)

Constant time O(1)O(1) via index for arrays, and linear time O(n)O(n) for linked lists because they must be stepped through sequentially.

22
New cards

Resizing Behavior (Array)

A high-cost linear copy (O(n)O(n)) performed when an array is full, usually resulting in doubling the size.

23
New cards

Linked List Memory Usage Rule

In a singly linked list of integers, memory usage is double that of an array storing the same data; an array more than 50 \text{\textpercent} full is more space-efficient than the equivalent linked list.

24
New cards

Singly Linked List

A list where each node contains data and exactly one pointer referencing the next node in the sequence.

25
New cards

Doubly Linked List

A list where each node contains data and two pointers: one for the next node and one for the previous node.

26
New cards

Sentinel Nodes

Permanent boundary nodes at the front and back of a linked list that do not hold valid data and eliminate pointer edge cases like null values.

27
New cards

Stack

A First In, Last Out (FILO) structure where elements are pushed and popped strictly from the front/top.

28
New cards

Queue

A First In, First Out (FIFO) structure where elements are enqueued at the back and dequeued from the front.

29
New cards

Circular Ring Structure

An array implementation for a queue that uses modulo math and two indices (front and back) to achieve O(1)O(1) efficiency for adding and removing elements.

30
New cards

Base Case

A scenario in recursion so basic that the function returns a value immediately without further recursive calls.

31
New cards

Recursive Case

A pathway that invokes the function itself with altered arguments designed to step closer to the base case.

32
New cards

Run-time Stack Frame

A newly allocated frame on the stack that houses a recursive function's distinct local variables and parameters; it pops off when a return statement is reached.

33
New cards

Stack Overflow

A crash caused by exhausting stack memory resources, often due to massive data or an incorrect base case in recursion.

34
New cards

Linear Search

A searching algorithm that inspects elements sequentially from index 0; it has a worst-case performance of O(n)O(n).

35
New cards

Binary Search

An algorithm that targets the midpoint of a sorted array and discards half the search range in each step; it requires sorted data and constant-time random access, performing at O(log(n))O(\text{log}(n))..

36
New cards

Bubble Sort

An O(n2)O(n^2) sorting algorithm that repeatedly steps through the list, compares adjacent pairs, and swaps them if they are out of order.

37
New cards

Selection Sort

An O(n2)O(n^2) sorting algorithm that scans an unsorted segment to find the minimum value and swaps it into the boundary of the sorted section.

38
New cards

Insertion Sort

An O(n2)O(n^2) sorting algorithm that pulls values from an unsorted piece and shifts the sorted items to drop the value into its relatively correct position.

39
New cards

Merge Sort

A recursive divide and conquer algorithm that splits a list into halves, sorts them, and merges them back together at O(nlog(n))O(n \text{log}(n)) complexity.

40
New cards

Quick Sort

A divide and conquer strategy that partitions data around a pivot value; it operates in-place with an average performance of O(nlog(n))O(n \text{log}(n)).

41
New cards

Partitioning Algorithm

The O(n)O(n) process in Quick Sort where a pivot is moved to the end, smaller elements are shifted to the front, and the pivot is swapped back to its correct central position.

42
New cards

Cut-off Optimization

A technique in Quick Sort where recursion stops once a partition drops below a threshold (16 to 32 elements) and switches to Insertion Sort.

43
New cards

Table ADT

An unordered collection mapping unique keys to data values.

44
New cards

Hash Function

A function that transforms a unique key into a numeric index, distributing values uniformly and randomly across available array slots.

45
New cards

Load Factor (\text{\textlambda})

The measure of hash table fullness calculated as \text{\textlambda} = \frac{\text{number of records in table}}{\text{number of locations}}.

46
New cards

Pigeonhole Principle

The principle stating that because possible keys (mm) outnumber capacity (nn), multiple distinct keys will inevitably hash to the same index, causing collisions.

47
New cards

Chaining (Closed Addressing)

A collision resolution strategy where each array index stores a pointer to a linked list of records; it has an average search performance of \text{\textTheta}(1 + \text{\textlambda}).

48
New cards

Linear Probing (Open Addressing)

A collision resolution strategy that stores exactly one record per slot, checking successive slots (i+1, i+2, \text{\textdots}) when a collision occurs.

49
New cards

Cluster

A contiguous block of adjacent filled slots in a linear probing hash table that slows down lookups.

50
New cards

Tombstoning

A removal method for linear probing where a slot status is set to 'Deleted' so that searches continue past it while new insertions can overwrite it.