Chapter 11 Flashcards

1
Q

dictionary

A

a mapping from a set of keys to their corresponding values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

key-value pair

A

the representation of the mapping from a key to a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

item

A

another name for a key-value pair

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

key

A

an object that appears in a dictionary as the first part of a key-value pair

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

value

A

an object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word ‘value’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

implementation

A

a way of performing a computation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

hashtable

A

the algorithm used to implement Python dictionaries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

hash function

A

a function used by a hashtable to compute the location for a key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

hashable

A

a type that has a hash function. Immutable types like integers, floats, and strings are hashable; mutable types like lists and dictionaries are not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

lookup

A

a dictionary operation that takes a key and finds the corresponding value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

reverse lookup

A

a dictionary operation that takes a value and finds one or more keys that map to it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

singleton

A

a list (or other sequence) with a single element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

call graph

A

a diagram that shows every frame created during the execution of a program, with an arrow from each caller to each callee.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

histogram

A

a set of counters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

memo

A

a computed value stored to avoid unnecessary future computation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly