Dictionary ADT Flashcards
What is the point of a dictionary ADT?
storing, inserting and removing entries for a collection
Application of dictionaries?
word-definition search
credit card auth
What distinguished a dictionary ADT from a map?
A dictionary allows for keys to have same key but diff value
What is the runtime complexity of the insert and remove & find in the Dictionary ADT?
insert take O(1) because it is not inserted in any particular order.
remove & find takes o(n) as you have to search, possibly n elements to find the entry that you are looking for
What are the 2 different ways that a dictionary can be implemented?
- List
2. Hash table that uses separate chaining as a collision handling strategy
What is a search table?
A dictionary implemented with a sorted array