Chapter 3: Data Structures and Algorithms

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/105

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

106 Terms

1
New cards

abstract data type (ADT)

consists of all data structures that share common functionality

2
New cards

abstraction

process of simplifying a concept in order to represent it in a computer

3
New cards

adjacent

in a graph abstract data type, the relationship between two vertices connected by an edge

4
New cards

algorithm analysis

study of the results produced by the outputs as well as how the algorithm produces those outputs

5
New cards

algorithm design pattern

solution to well-known computing problems

6
New cards

algorithmic paradigm

common concept and ideas behind algorithm design patterns

7
New cards

algorithmic problem solving

refers to a particular set of approaches and methods for designing algorithms that draws on computing’s historical connections to the study of mathematical problem solving

8
New cards

array list

data structure that stores elements next to each other in memory

9
New cards

asymptotic analysis

evaluates the time that an algorithm takes to produce a result as the size of the input increases

10
New cards

asymptotic notation

mathematical notation that formally defines the order of growth

11
New cards

AVL tree

balanced binary search tree data structure often used to implement sets or maps that organizes elements according to the AVL tree property

12
New cards

AVL tree property

requires the left and right subtrees to be balanced at every node in the tree

13
New cards

balanced binary search tree

introduces additional properties that ensure that the tree will never enter a worst-case situation by reorganizing elements to maintain balance

14
New cards

Big O notation

most common type of asymptotic notation in computer science used to measure worst case complexity

15
New cards

binary heap

binary tree data structure used to implement priority queues that organizes elements according to the heap property

16
New cards

binary logarithm

tells how many times a large number needs to be divided by 2 until it reaches 1

17
New cards

binary search algorithm

recursively narrows down the possible locations for the target in the sorted list

18
New cards

binary search tree

tree data structure often used to implement sets and maps that organizes elements according to the binary tree property and the search tree property

19
New cards

binary tree property

requires that each node can have either zero, one, or two children

20
New cards

breadth-first search

iteratively explores each neighbor, expanding the search level-by-level breadth-first

21
New cards

brute-force algorithm

solves combinatorial problems by systematically enumerating all potential solutions in order to identify the best candidate solution

22
New cards

canonical algorithm

well-known algorithm

23
New cards

case analysis

way to account for variation in runtime based on factors other than the size of the problem

24
New cards

child node

descendant of another node

25
New cards

collision

situation where multiple objects hash to the same integer index value

26
New cards

combinatorial explosion

exponential number of solutions to a combinatorial problem that makes brute-force algorithms unusable in practice

27
New cards

combinatorial problem

involves identifying the best candidate solution out of a space of many potential solutions

28
New cards

comparison sorting

sorting of a list of elements where elements are not assigned numeric values but rather defined in relation to other elements

29
New cards

complexity

condition based on the degree of computational resources that an algorithm consumes during its execution in relation to the size of the input

30
New cards

compression

problem of representing information using less data storage

31
New cards

constant

type of order of growth that does not take more resources as the size of the problem increases

32
New cards

correctness

whether the outputs produced by an algorithm match the expected or desired results across the range of possible inputs

33
New cards

cost model

characterization of runtime in terms of more abstract operations such as the number of repetitions

34
New cards

count sorting

sorting a list of elements by organizing elements into categories and rearranging the categories into a logical order

35
New cards

cryptography

problem of masking or obfuscating text to make it unintelligible

36
New cards

data structure

complex data type with specific representation and specific functionality

37
New cards

data structure problem

computational problem involving the storage and retrieval of elements for implementing abstract data types such as lists, sets, maps, and priority queues

38
New cards

data type

determines how computers process data by defining the possible values for data and the possible functionality or operations on that data

39
New cards

depth-first search

graph traversal algorithm that recursively explores each neighbor, continuing as far possible along each subproblem depth-first

40
New cards

Dijkstra’s algorithm

maintains a priority queue of vertices in the graph ordered by distance from the start and repeatedly selects the next shortest path to an unconnected part of the graph

41
New cards

divide and conquer algorithm

algorithmic paradigm that breaks down a problem into smaller subproblems (divide), recursively solves each subproblem (conquer), and then combines the result of each subproblem in order to inform the overall solution

42
New cards

edge

relationship between vertices or nodes

43
New cards

element

individual data point

44
New cards

experimental analysis

evaluates an algorithm’s runtime by recording how long it takes to run a program implementation of it

45
New cards

functionality

operations such as adding, retrieving, and removing elements

46
New cards

graph

represents binary relations among collection of entities, specifically vertices and edges

47
New cards

graph problem

computational problem involving graphs that represent relationships between data

48
New cards

greedy algorithm

solves combinatorial problems by repeatedly applying a simple rule to select the next element to include in the solution

49
New cards

hash table

implements sets and maps by applying the concept of hashing

50
New cards

hashing

problem of assigning a meaningful integer index for each object

51
New cards

heap property

requires that the priority value of each node in the heap is greater than or equal to the priority values of its children

52
New cards

heapsort algorithm

adds all elements to a binary heap priority queue data structure using the comparison operation to determine priority value and returns the sorted list by repeatedly removing from the priority queue element-by-element

53
New cards

index

position or address for an element in a list

54
New cards

interval scheduling problem

combinatorial problem involving a list of scheduled tasks with the goal of finding the largest non-overlapping set of tasks that can be completed

55
New cards

intractable

problems that do not have efficient, polynomial-time algorithms

56
New cards

Kruskal’s algorithm

greedy algorithm that sorts the list of edges in the graph by weight

57
New cards

leaf node

node at the bottom of a tree that has no children

58
New cards

linear

type of order of growth where the resources required to run the algorithm increases at about the same rate as the size of the problem increases

59
New cards

linear data structure

category of data structures where elements are ordered in a line

60
New cards

linked list

data structure that does not necessarily store elements next to each other and instead works by maintaining, for each element, a link to the next element in the list

61
New cards

list

ordered sequence of elements and allows adding, retrieving, and removing elements from any position in the list

62
New cards

logarithm

tells how many times a large number needs to be divided by a small number until it reaches 1

63
New cards

longest path

problem of finding the highest-cost way to get from one vertex to another without repeating vertices

64
New cards

map

represents unordered associations between key-value pairs of elements, where each key can only appear once in the map

65
New cards

matching

problem of searching for a text pattern within a document

66
New cards

merge sort

canonical divide and conquer algorithm for comparison sorting

67
New cards

minimum spanning tree

problem of finding a lowest-cost way to connect all the vertices to each other

68
New cards

model of computation

rules of the underlying computer that is ultimately responsible for executing the algorithm

69
New cards

node

represents an element in a tree or graph

70
New cards

nondeterministic algorithm

special kind of Turing machine, which at each step can non-deterministically choose which instruction to execute and is considered to successfully find a solution if any combination of these nondeterministic choices leads to a correct solution

71
New cards

nondeterministic polynomial (NP) time complexity class

all problems that can be solved in polynomial time by a nondeterministic algorithm

72
New cards

NP-complete

all the hardest NP problems—the combinatorial problems for which we do not have deterministic polynomial-time algorithms

73
New cards

order of growth

geometric prediction of an algorithm’s time or space complexity as a function of the size of the problem

74
New cards

perfectly balanced

for every node in the binary search tree, its left and right subtrees contain the same number of elements

75
New cards

polynomial (P) time complexity class

all problems that have runtimes described with a polynomial expression such as O(1), O(log N), O(N), O(N log N), O(N2), O(N3)

76
New cards

Prim’s algorithm

greedy algorithm that maintains a priority queue of vertices in the graph ordered by connecting edge weight

77
New cards

priority queue

represents a collection of elements where each element has an associated priority value

78
New cards

problem

task with specific input data and output data corresponding to each input

79
New cards

problem model

simplified, abstract representation of a more complex real-world problem

80
New cards

program

realization or implementation of an algorithm written in a formal programming language

81
New cards

quicksort algorithm

recursively sorts data by applying the binary search tree algorithm design pattern to partition data around pivot elements

82
New cards

reachable vertex

vertex that can be reached if a path or sequence of edges from the start vertex exists

83
New cards

reduction algorithm

solves problems by transforming them into other problems

84
New cards

representation

particular way of organizing a collection of elements

85
New cards

root node

node at the top of the tree

86
New cards

runtime analysis

study of how much time it takes to run an algorithm

87
New cards

search tree property

requires that elements in the tree are organized least-to-greatest from left-to-right

88
New cards

searching

problem of retrieving a target element from a collection of elements

89
New cards

sequential search algorithm

searching algorithm that sequentially checks the collection element-by-element for the target

90
New cards

set

represents an unordered collection of unique elements and allows adding, retrieving, and removing elements from the set

91
New cards

shortest path

problem of finding a lowest-cost way to get from one vertex to another

92
New cards

shortest paths tree

output of the shortest paths problem, the lowest-cost way to get from one vertex to every other reachable vertex in a graph

93
New cards

sorting

problem of rearranging elements into a logical order

94
New cards

space complexity

formal measure of how much memory an algorithm requires during its execution as it relates to the size of the problem

95
New cards

step

basic operation in the computer, such as looking up a single value, adding two values, or comparing two values

96
New cards

string problem

computational problem involving text or information represented as a sequence of characters

97
New cards

subproblem

smaller instance of a problem that can be solved independently

98
New cards

time complexity

formal measure of how much time an algorithm requires during execution as it relates to the size of the problem

99
New cards

tractable

problems that computers can solve in a reasonable amount of time

100
New cards

traveling salesperson problem (TSP)

problem of, given the path cost of every pair of vertices, finding the lowest-cost tour, or path from a start vertex visiting every vertex in the graph once including a return to the start vertex