Set Flashcards

1
Q

Definition

A

it’s a collection of unordered objects

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

properties of a set?

A

no index , no key , no sequence , no duplicates

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

benefits of a set?

A

no duplicates , very fast lookup

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

how to store a set?

A

using a hash table but instead a key and a value it’s an index with a value like just storing 1 and the object itself

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

is a set used for retrieval?

A

no it’s used to check for membership like do i have this product in my list of products

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