Types of Data Structure | Data Structure & Algorithm

Types of Data Structure

Types of Data Structure: 


So there are two types of data structure the first one is Linear Data Structure and the second one is a Non-linear data structure.


1. Linear Data Structure :

The data Structure where teams are 0aganize in Sequence is linearly where the data element attached one after another is called linear data Structure. The data Element in a linear data Structure as transversally one after the other and only one element can directly reach feed transversally.All the data items in the linear data structure are very easy to implement because memory is also organized linear fashion.
The data Structure where data is organized or in the fashion of linear then the data will be considered as Linear Data Structure.

There are some examples of linear data structures are as follow:
  • Array
  • Stack
  • Queue
  • LinkedList
Array: Array is a collection of similar data types.
Stack: Stack is Last In First Out (LIFO) data structure where the element that added last will deleted first.
Queue: Queue is First In First Out (FIFO) data structure where the element that added first will delete first.
LinkedList: A linked list is a collection of nodes.

2. Non-Linear Data Structure:

The data Structure where data element are not organized in Sequence is Called as non-linear data Structure. In Other word a data element of the non linear data Structure are not connected one after another like as Linear data structure.
In non-linear data structure elements are not in fashion of sequential format.

There are some examples of linear data structures are as follow:
  • Tree 
  • Graph
Tree: Tree is collection of elements "nodes" one of which is distinction as a root.
Graph: Graph is collection edges and vertices.


Comments