Associative Array (Module 7) Flashcards
What is a fundamental concept in computer science used for efficiently storing and retrieving data
hashing
How does hashing work?
mapping data to a hash code using a hash function
Which type of an array is an ADT that stores key-value pair?
associative array
For an associative array, each key is _____ and associated with a ______.
unique, value
For an associative array, what does a key allow you to do?
retrieve or update a value
Which field represents the unique identifier?
Key
Which field represents the associated data for the key?
Value
To insert, search or delete, which two search algorithms are used to locate the right key in the associative array?
linear search and binary search
Which search algorithm is best for an associative array sorted by key for faster lookups?
binary search
Which search algorithm is slow for large associative arrays if the array isn’t sorted?
linear search
Why is linear search and binary search inefficient for large datasets?
searches, insertions, and deletions can be slow