The logical or mathematical model of a particular organization of data is called a data structure. The data structure is a way of storing and accessing the data into an acceptable form for computers. So that a large number of data is processed in a small interval of time. In a simple way, we say that storing the data in computer memory is called a data structure.
Types of Data Structure
A data structure can be broadly classified into
- Primitive data structure
- Non-primitive data structure
Primitive data structure
The data structures, typically those data structure that is directly operated upon by machine-level instructions i.e. the fundamental data types such as int, float, double incase of ‘C’ are known as primitive data structures
Non-primitive data structure
The data structures, which are derived from primitive data structures called non-primitive data structures.
Operations on data structure
The four major operations performed on data structures are:
- Insertion: – Insertion means adding new details or a new node into the data structure.
- Deletion: – Deletion means removing a node from the data structure.
- Traversal: – Traversing means accessing each node exactly once so that the nodes of a data structure can be processed. Traversing is also called visiting.
- Searching: – Searching means finding the location of the node for a given key value.
- Sorting: – It is a method to arrange data either in ascending order or In descending order.
- Merging: – Merging is a process of combining the data items of two Sorted lists into a single sorted list.