data structure

A way of arranging data in memory, such as a list, dictionary, tree or graph, so that certain operations become cheap.

In more detail

The same values can be stored in many structures, and each makes some operations fast and others slow. A list keeps order and allows index access, while a dictionary answers "is this key here?" almost instantly. Picking a structure means picking the operations you will do most often and making those cheapest.

Related terms

Taught in

References