Data structures overview

We've talked a bit about data structures, but what is a data structure? Simply put, a data structure is a way of organising data so that it can be effectively and efficiently used. It can be visualised as a data container which has a specific structure.

In the next few sections, we'll be covering the following data structures:

Before we do, it's worth noting the difference between a data structure and what's known as an "abstract data type". An abstract data type is an abstraction of a data structure which specifies the "interface" or "contract" for that data structure but doesn't tell us how to implement the data structure.

For example, a common abstract data type is a list. Its interface might specify that it should support adding elements, removing elements and searching for elements. We could implement a list using a variety of concrete data structures. Two common implementations are an array and a linked list. We'll start with the array.