Algorithms and Data Structures Flashcards

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

1/37

flashcard set

Earn XP

Description and Tags

Vocabulary-style flashcards based on lecture notes covering algorithm analysis, data structures, recursion, and sorting algorithms.

Last updated 12:45 AM on 6/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

38 Terms

1
New cards

Algorithms Analysis

A measurement of 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

A measure of efficiency calculated by counting the number of operations performed, assuming every individual operation has an identical time cost.

3
New cards

Memory Resource

A measure of efficiency calculated by evaluating variable declarations and dynamically allocated memory.

4
New cards

Abstract Data Type (ADT)

A definition of 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 used to implement an ADT, such as an Array, Linked List, or Hash Table.

6
New cards

Constant O(1)O(1)

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

7
New cards

Logarithmic 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 size increases.

8
New cards

Linear 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 O(n log 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 for higher ones.

10
New cards

Quadratic O(n2)O(n^2)

A growth rate described mathematically by a parabola.

11
New cards

Exponential O(2n)O(2^n)

A growth rate where every additional unit of data requires a complete doubling of resources, causing the curve to shoot up to near-vertical.

12
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{ } \b{

13
New cards

Omega (\text{\Omega})

An asymptotic notation indicating a lower bound.

14
New cards

Theta (\text{\Theta})

An asymptotic notation representing an exact bound.

15
New cards

Little-o (oo)

An asymptotic notation defining an upper bound that will never actually be reached.

16
New cards

Dominating Term

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

17
New cards

List ADT

A sequence of values characterized by an ordering (first, second, etc.) which is independent of whether the data values themselves are sorted.

18
New cards

Singly Linked List

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

19
New cards

Doubly Linked List

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

20
New cards

Sentinel Nodes

Boundary nodes at the front and back of a linked list that hold no valid data and eliminate pointer edge cases by ensuring pointers are never raw null values.

21
New cards

Stack

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

22
New cards

Queue

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

23
New cards

Recursion

A method of solving complex problems by taking one small step and restating the remaining problem in terms of itself.

24
New cards

Base Case

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

25
New cards

Run-Time Stack

A memory structure where every recursive function call allocates a new frame to house its distinct local variables and parameters.

26
New cards

Linear Search

A search algorithm that starts at index 0 and inspects elements sequentially one-by-one until the target matches or the list ends; works on unsorted lists.

27
New cards

Binary Search

A search algorithm that targets the midpoint of a sorted search range and discards half of the elements at each step; requires random access.

28
New cards

Bubble Sort

An O(n2)O(n^2) algorithm that compares adjacent pairs and swaps them if out of order, repeating until the largest value bubbles to the back.

29
New cards

Selection Sort

An O(n2)O(n^2) algorithm that scans the unsorted segment for the absolute minimum value and swaps it into the boundary index of the sorted section.

30
New cards

Insertion Sort

An O(n2)O(n^2) algorithm that pulls the next unsorted value, shifts sorted items up to open a slot, and drops the value into its relative position.

31
New cards

Merge Sort

A recursive divide and conquer algorithm that splits lists into halves until they reach the base case of size 0 or 1 and then merges them back together.

32
New cards

Quick Sort

An in-place divide and conquer sorting strategy that utilizes partitioning around a pivot value.

33
New cards

Table ADT

An unordered collection mapping unique keys to values, where keys must be distinct but data values can be duplicates.

34
New cards

Hash Table

A data structure that uses a hash function to transform a unique key into a numeric index within an underlying array for direct access.

35
New cards

Load Factor (\text{\lambda})

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

36
New cards

Chaining (Closed Addressing)

A collision resolution strategy where every index in the array stores a pointer to a linked list of records that map to that specific index.

37
New cards

Linear Probing (Open Addressing)

A collision resolution strategy that checks index i+1,i+2,i+3i+1, i+2, i+3, etc., until an open slot is found.

38
New cards

Tombstoning

A method for handling removal in linear probing where a slot status is flipped to 'Deleted' so searches do not stop, but new insertions can overwrite it.