Data Structures - Hash Tables Flashcards
1
Q
What are hash tables used for?
A
-They are used to store data in a random manner.
-Each item maps to an address in a table containing data about that item
-They are used to calculate a value from unique
-
2
Q
What do you do when adding new data to a hash table
A
you convert the data into ascii code and then put into the hash function. If the calculated position is empty insert the item and stop. if not add it to the first position in the overflow table
3
Q
how to search a hash table
A
you convert the data into ascii code and then put into the hash function. If the calculated position is empty then search that position. if it is already taken look in the overflow table.