Associative Array (Module 7) Flashcards

1
Q

What is a fundamental concept in computer science used for efficiently storing and retrieving data

A

hashing

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

How does hashing work?

A

mapping data to a hash code using a hash function

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

Which type of an array is an ADT that stores key-value pair?

A

associative array

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

For an associative array, each key is _____ and associated with a ______.

A

unique, value

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

For an associative array, what does a key allow you to do?

A

retrieve or update a value

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

Which field represents the unique identifier?

A

Key

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

Which field represents the associated data for the key?

A

Value

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

To insert, search or delete, which two search algorithms are used to locate the right key in the associative array?

A

linear search and binary search

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

Which search algorithm is best for an associative array sorted by key for faster lookups?

A

binary search

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

Which search algorithm is slow for large associative arrays if the array isn’t sorted?

A

linear search

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

Why is linear search and binary search inefficient for large datasets?

A

searches, insertions, and deletions can be slow

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