Here you find the brief about the data structure and its types; we hope you enjoy this article.

**What is a data structure?**

The logical or mathematical model of a particular organization of data is called data structure. Data structure is way of storing and accessing the data in to acceptable form for computer. So that large number of data is processed in small interval of time. In simple way we say that storing the data in to computer memory is called 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 are 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 structure called non-primitive data structures.

There are two types of non-primitive data structures.

**Linear Data Structures:-**A data structure whose elements form a sequence and every element has a unique predecessor and unique successor. Or a list, which shows the relationship of adjacency among elements, is said to be a linear data structure. The most, simplest linear data structure is a 1- D array. Other examples of linear data structures are link list, stack, queues, etc.- Non-linear data structure:- A data structure whose elements do not form a sequence and there is no unique predecessor and unique successor. Or A list, which doesn’t show the relationship of adjacency between elements, is said to be a non-linear data structure. Examples of non-linear data structures are trees and graphs.

**More about Linear Data Structure:**

Little description of linear data structure is given below.

**Link List: **A link list is an example of linear data structures. it is a collection of nodes and each node can hold the address of previous nodes or next nodes or both the nodes. It can be divided into singly, doubly or circular link lists and circular doubly-linked lists.

**Short description of link list is given below:**

**Singly-linked list: –**A single linked list is used to traverse among the nodes in one direction.**Doubly linked list: –**A double linked list is used to traverse among the nodes in both directions.**Circular linked list: –**It is a singly linked list in which the last node contains the address of the first node.**Circular doubly link list: –**It is also a doubly-link list whose first and last elements contain the address of each other.

**Stack: –** It is also called as last-in-first-out (LIFO) system. It is a linear list in which insertion and deletion take place only at one end. It is used to evaluate different expressions.

**Queue: –** It is also called as first-in-first-out (FIFO) system. It is a linear list in which insertion takes place at once end and deletion takes place at other end. It is generally used to schedule a job in operating systems and networks.

**Non-linear data structure:-** The frequently used non-linear data structures are

**(a) Trees : – **It maintains hierarchical relationship between various elements

**(b) Graphs : –** It maintains random relationship or point-to-point relationship between various elements.

**Related topics: (Data structures)**

- introduction to the data structure
- what is a pointer in c
- searching in the data structure
- sorting in the data structure
- linked list with operation and application
- queue and application of queue
- stack and application of stack
- row and column-major ordering in an array

If you find any error in this article then you can simply comment below.

Thank you so much!