What's a Data Structure?
A data structure is a way of organizing and storing a set of data so that we can efficiently access and manipulate it. The chosen data structure will determine how the data is related, as well as provide methods for us to manipulate such data.
Think of a supermarket where different products are organized in different ways. Some products are arranged on shelves according to category (hygiene, food, cleaning), others are kept in freezers (meat and dairy), while stocked products are organized in boxes and pallets to be displayed as needed. Some of these products are placed on higher shelves and require forklifts to access, while others can be accessed directly.
You can think of data structures in a similar way.

How Are Data Structures Implemented?
Although they follow a similar pattern, different programming languages have different ways of implementing data structures. Some languages already have various data structures implemented by default. By combining primitive types such as integers, booleans, and chars with manipulation functions, we can create more complex data structures that allow operations like searching, sorting, insertion, and removal.
Linear and Non-Linear Data Structures
Linear
These are structures where data is organized in a line, and items are inserted one after another in sequence. Some linear structures include Arrays, Linked Lists, Queues, and Stacks.
Non-Linear
These structures are not organized sequentially, and their organization depends on factors other than the order of insertion. Examples of non-linear structures include Trees and Graphs.
Common Types of Data Structures
There are numerous data structures that can be used to solve a wide range of problems. Some of the most common data structures include:
- Arrays
- Linked Lists
- Stacks
- Queues
- Trees
- Graphs
- Hash Tables
- Dictionaries
- Heaps