O'Reilly logo

Everyday Data Structures by William Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Dictionaries: Keyed Collections

A dictionary is an abstract data structure that can be described as a collection of keys and associated values, where each key only appears once within the collection. This associated relationship between the keys and values is why dictionaries are sometimes referred to as associative arrays. Dictionaries are also known as maps, or more specifically, hash maps for hash table-based dictionaries and tree maps for search tree-based dictionaries. The four most common functions associated with a dictionary are add, update, get, and remove. Other common operations include contains, count, reassign, and set. Each of these operations will be examined in detail later in this chapter.

The mapped, or associative, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required