**Data structure** is a way of organizing data in such a way that we can perform an operation on this data in an effective way. There are two basic concepts of a data structure: Interface and Implementation.

The interface is the set of operations that a database structure supports whereas implementation provides the internal representation of a data structure.

Characteristics of a Data Structure

**Correctness**: Data structure implementation should implement its interface correctly.

**Space Complexity**: A data structure operation should use as little memory as possible.

**Time Complexity**: The execution time of the data structure operation should be very little.

Types of Data Structures

As we learned, anything that can store data is called a data structure. There are two basic types of Data Structures:

- Primitive Data Structure
- Non-Primitive Data Structure

**Primitive Data Structures** are the basic data structures that operate directly on the machine. They are also called the built-in data structures and have different representations on different computers. Primitive Data Structures are further divided into Integer, Float, Character, and Pointer.

**Non-Primitive Data Structures** are derived from the primitive data structures and are complex in nature. They are the user-defined data structures that emphasize grouping same or different data items based on the relationship between each data item. Non-Primitive Data Structures are further divided into Arrays, Lists, and Files.