A dictionary, in computer science, is a data structure that maps keys to values such that given a key its corresponding value can be efficiently retrieved.

A dictionary is commonly implemented as a hash map which allow O(1) amortized lookup. Alternatively they may be implemented as a sorted list, with lookup requiring a binary search and making the lookup O(log N) amortized instead.

When tagging a question with , be sure to tag it with the language being used as well.