PA Review

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

1/47

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:22 PM on 9/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

48 Terms

1
New cards
Divide-and-conquer approach
A top-down algorithm design approach that breaks a problem into smaller subproblems, solves them, and combines the results.
2
New cards
Brute-force approach
An approach that tries possible solutions directly or exhaustively rather than using a more efficient shortcut.
3
New cards
Definiteness
Every step of an algorithm must be clearly and precisely defined.
4
New cards
Unambiguity
Each algorithm step must have only one clear interpretation.
5
New cards
Recurrence relation
An equation that defines a function using a smaller instance of the same function, such as f(n) = f(n - 1) + 2.
6
New cards
Recursion
A technique where a function solves a problem by calling itself on a smaller version of the problem.
7
New cards
Base case
The condition that stops a recursive function from calling itself again.
8
New cards
T(N) = N + T(N - 8) recursion-tree levels
Approximately N / 8 levels because each recursive call reduces N by 8.
9
New cards
Linearithmic runtime
O(N log N).
10
New cards
Constant-time operation
O(1), meaning the amount of work does not grow with the input size.
11
New cards
Why does a constant number of operations remain O(1)?
Big O ignores fixed constants because the amount of work does not grow with N.
12
New cards
Hash table average insertion
O(1).
13
New cards
Hash table average search
O(1).
14
New cards
Hash table worst-case search
O(N) when collisions cause many items to be examined.
15
New cards
Operator precedence
Parentheses, exponentiation, multiplication/division/modulus, addition/subtraction, comparisons, then logical operators.
16
New cards
In X / 2 + Y
17
New cards
2 == 10, what happens first?
Y
18
New cards
2 because exponentiation has higher precedence than division, addition, and comparison.
19
New cards
List slicing
my_list[start:end] creates a new list containing elements from start up to but not including end.
20
New cards
Else range after if x < 5 and elif x > 30
The else covers values from 5 through 30 inclusive.
21
New cards
break
Immediately exits the current loop.
22
New cards
Overloaded methods
Methods that share the same name but differ in their parameters or implementation context.
23
New cards
Stack
A last-in, first-out data structure.
24
New cards
Python list method used to push onto a stack
append().
25
New cards
Queue
A first-in, first-out data structure.
26
New cards
peek() on an empty queue
May result in undefined behavior depending on the queue implementation.
27
New cards
Singly linked-list queue node
Stores data and a reference to the next node.
28
New cards
Deque
A double-ended queue that allows insertion and removal from both ends.
29
New cards
Dummy node in a linked list
A permanent placeholder node that eliminates special-case handling for the head node.
30
New cards
Removing the first node of a singly linked list
Update the head reference so it points to the next node.
31
New cards
Circular linked list
A linked list where the last node points back to the first node, allowing continuous cycling.
32
New cards
Abstract data type (ADT)
Defines what operations are available without requiring the programmer to know the internal implementation.
33
New cards
Abstraction
Hides implementation details so the programmer can work with higher-level operations.
34
New cards
Record
A data structure containing named fields or subitems.
35
New cards
Binary space partitioning
Repeatedly divides a region of space into two parts and catalogs objects within those regions.
36
New cards
Counting sort
A sorting algorithm that uses the known range of possible values to count occurrences.
37
New cards
Quicksort high partition
Contains values greater than or equal to the pivot.
38
New cards
Quicksort low partition
Contains values less than or equal to the pivot.
39
New cards
Pivot
The value used to divide data into low and high partitions during Quicksort.
40
New cards
Merge sort index variables
Typically uses three index variables to track positions while merging arrays.
41
New cards
Radix sort
Sorts integers or strings by processing individual digits or characters.
42
New cards
Bubble sort nested loops
Repeatedly compare and swap adjacent elements until the list is sorted.
43
New cards
Quickselect
Uses partitioning like Quicksort but only continues into the partition containing the desired ranked element.
44
New cards
Quicksort vs Quickselect
Quicksort recursively processes both partitions; Quickselect follows only the relevant partition.
45
New cards
Bucket sort
Divides values into groups or buckets, sorts each bucket, and combines the buckets.
46
New cards
Dictionary compression
Replaces repeated phrases or data with shorter codes and stores the mappings in a dictionary.
47
New cards
Huffman coding
Compresses data by assigning shorter codes to more frequent characters and longer codes to less frequent characters.
48
New cards
Huffman coding frequency rule
The more frequently a character occurs, the shorter its binary code should be.