C949

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

1/104

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

105 Terms

1
New cards

record

data structure that stores subitems, often with a name associated with each subitem

2
New cards

array

DS that stores an ordered list of items, where each item is directly accessible by a positional index

3
New cards

linked list

DS that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node

4
New cards

binary tree

DS in which each node stores data and has up to 2 children, known as a left and right child

5
New cards

hash table

DS that store unordered items by mapping each to a location in array

6
New cards

heap

max-heap maintains node’s key >= children’s keys.
min-heap maintains node’s key<= children’s keys.

7
New cards

graph

DS for repr. connections among items, and consists of vertices connected by edgesver

8
New cards

vertex

item in a graph

9
New cards

edge

connection between two vertices in a graph

10
New cards

must be imported for python
duplicates okay
mutable
homogeous

array

11
New cards

head and pointer
not indexed

linked list

12
New cards

linear search

algorithm that starts from the beginning of a list and checks each element until the search key is found or the end of the list is reached. sorted or unsorted

13
New cards

binary search

starts in middle and uses “divide and conquer“ approach

14
New cards

bubble sort

iterates through a list, comparing and swapping

15
New cards

selection sort

nested loops
runtime: O(n²)
looks for smallest number

16
New cards

insertion sort

add number to sorted and sort as you go
FOR and WHILE loops
runtime: O(n²)

17
New cards

quick sort

everything on left side has to be less than pivot card
runtime: O(n log n)

18
New cards

merge

split in half, take the smallest of the four and switch
runtime: O(n log n)

19
New cards

radix sort

numbers go into 0-9 buckets accoridng to tens digit
runtime: O(n)

20
New cards

records
array
hash table
binary tree
linked list
graph
heap

Basic data structures: RAHBLGH

21
New cards

ADT

data type with predefined user operations (behaviour of data)

22
New cards

list

which ADT holds ordered data and uses arrays or linked lists

23
New cards

dynamic arrary

which ADT holds ordered data and allows indexed access, and uses array

24
New cards

stack

which ADT items are removed and inserted only from top, and uses linked list

25
New cards

queue

which ADT items inserted at end and removed from front, uses linked list

26
New cards

deque

which ADT uses insertion and removal from front and back? linked list

27
New cards

bag

which ADT stores unordered items and duplicates, uses array and linked list

28
New cards

set

which ADT is a collection of distinct items, unordered, and uses BST & hash table

29
New cards

priority queue

which ADT puts high priority at front, uses heap

30
New cards

dictionary

which ADT maps keys with values, uses BST & hash table

31
New cards

abstraction

user interacts high-level with items, low-level things hidden

32
New cards

python

which language uses list, set, dict, deque

33
New cards

C++

which language uses vector, list, set, deque, queue, stack, map

34
New cards

Java

which language uses collection, list, set, map, queue, deque

35
New cards

compression

encodes frequently used items into bits

36
New cards

Huffman coding

Assigns less bits using binary tree

37
New cards

Heuristic

A technique that willingly accepts less accuracy to improve speed

38
New cards

heuristic algorithm

Quickly determines near optimal solution, speed over accuarcy

39
New cards

Self adjusting heuristic

Modifies DS based on how the DS is used

40
New cards

red-black tree and AVL tree

what are 2 self-adjusting data structures

41
New cards

dynamic programming

what splits problems into subproblems, then uses stored solutions larger problems

42
New cards

Greedy algorithm

Which algorithm solves by assuming optimal choice currently will be optimal choice over all

43
New cards

LIST

what gets last item popped and returns it

44
New cards

SET

what gets random item popped

45
New cards

in, not in

what tests membership

46
New cards

tuple

which DS is immutable (can’t add/change) and faster than list

47
New cards

list

which DS is most common, grows and shrinks as needed, and sortable

48
New cards

set

which DS is non-duplicate, faster access than list, and unordered

49
New cards

clear & unambiguous,
well-def inputs,
outputs,
finite-ness,
feasible,
language independent

what are 6 characteristics of an algorithm

50
New cards

clear and unambigous

which characteristic? algorithm should be unique in every way and lead to single conlusion

51
New cards

well-defined inputs

which characteristic? algorithm must indicate what output will be produced

52
New cards

well-defined outputs

which characteristic? algorithm must indicate what output will be produced

53
New cards

finit-ness

which characteristic? algorithm must be finite and not result in endless loops

54
New cards

feasability

which characteristic? algorithm must be simple, generic, and practical. Must be executed with only available resources, has practical hardware requirements

55
New cards

language independent

which characteristic? algorithm must be simple instructions in simple manner and can be implemented by any future language

56
New cards

priori analysis

theoretical analysis of algorithm before implementation

57
New cards

post analysis

practical analysis of algorithm utilizing any language to build. purpose is to determine how much time and space it takes to operate

58
New cards

time complexity

amount of time required to finish an algorithm’s execution known as?

59
New cards

space complexity

quantity of space required to solve a problem and produce an output?

60
New cards

time complexity

what does big O notation express?

61
New cards

number of steps required to complete task

what is time complexity determined by?

62
New cards

the asymptotic notation used to depict the temporal complexity

what is big O notation?

63
New cards

auxiliary space + input size

what is space complexity?

64
New cards

algorithm is like concept to solve problem,
programmer executes one or more task by computer

difference between algorithm and programmer

65
New cards

linear and binary search

2 examples of searching algorithms

66
New cards

recursive algorithm

which algorithm breaks a problem into minor, then calls function repeatedly

67
New cards

merge and quick sort

2 examples of divide and conquer algorithms

68
New cards

greedy algortihms

which algorithm looks for best possible solution and continues with that to final

69
New cards

insertion sort

which sort? from left to right, sorts and adds to the left sorted pile

70
New cards

O(n²)

what notation does insertion sort have?

71
New cards

key

value used to map to an index

72
New cards

hash table

which is faster for searching? Hash table or list?

73
New cards

bucket

name of each hash table element

74
New cards

hash function

what computes a bucket index from item’s key

75
New cards

stack

does queue or stack have LIFO?

76
New cards

queue

does queue or stack have FIFO?

77
New cards

insert on top

what does push do?

78
New cards

removes and returns on top

what does pop do?

79
New cards

inserts at END of queue

what does enque do?

80
New cards

removes from the front and returns number

what does dequeue do?

81
New cards

deque, double ended

what ADT gets items inserted and removed from both front and back

82
New cards

key

what is a value used to map to an index

83
New cards

bucket

what’s the name of each hash table array element

84
New cards

hash function

what computes a bucket index from item’s key

85
New cards

chaining

what is a collision resolution where each bucket has a list of items

86
New cards

open addressing

which collision resolution technique where looks for an empty bucket elsewhere in the table

87
New cards

linear probing

what handles collisions starting at key’s amped bucket, then finding linearly

88
New cards

double hashing

what uses open-addressing as a collision technique and uses 2 diff. number functions to compute bucket indicies

89
New cards

cryptography

name for transmitting data securely

90
New cards

encryption

name for alteration of data to hide og meaning

91
New cards

not full, complete, not perfect

knowt flashcard image
92
New cards

full

in binary tree, what means every node has 0 or 2 children

93
New cards

complete

in binary tree, what means all levels, except poss. last level, contain all poss. nodes and all nodes in the last level are as far left as possible

94
New cards

perfect

in binary tree, what means all internal nodes have 2 children and all leaf nodes are at the same level

95
New cards

not full, not complete, not perfect

knowt flashcard image
96
New cards

full, not complete, not perfect

knowt flashcard image
97
New cards

a name that holds a value

What is a variable in a computer program?

98
New cards

an expression

What can be on the right side of an assignment statement?

99
New cards

a style guide for writing python code

What is PEP 8 in Python programming?

100
New cards

value, type, and identity

What are three defining properties of a Python object?