Dictionary as ADT
-
Domain:
-
a collection of pairs; each pair consists of a key, and some additional data
-
Operations (typical):
-
Create a table (initially empty)
-
Insert a new key-data pair in the table; if a key-data pair with the same key is already there, update the data part of the pair
-
Find the key-data pair in the table corresponding to a given key; return the data
-
Delete the key-data pair corresponding to a given key
-
Enumerate (traverse) all key-data pairs in the table
CONTENTS PREVIOUS NEXT