Types of Data Structures

We have two types of data structures:

  • Linear Data Structure
  • Non-linear Data Structure

Linear data structures

Elements of Linear data structure are accessed in a sequential manner; however the elements can be stored in these data structure in any order.

Examples of linear data structure are: Linked List, Stack, Queue and Array

Non-linear data structures

Elements of non-linear data structures are stores and accessed in non-linear order.

Examples of non-linear data structure are: Tree and Graph

The data structures can also be classified on the basis of the following characteristics:

LinearIn Linear data structures,the data items are arranged in a linear sequence. Example: Array
Non-LinearIn Non-Linear data structures,the data items are not in sequence. Example: Tree, Graph
HomogeneousIn homogeneous data structures, all the elements are of same type. Example: Array
Non-HomogeneousIn Non-Homogeneous data structure, the elements may or may not be of the same type. Example: Structures
StaticStatic data structures are those whose sizes and structures associated memory locations are fixed, at compile time. Example: Array
DynamicDynamic structures are those which expands or shrinks depending upon the program need and its execution. Also, their associated memory locations changes. Example: Linked List created using pointers

Introduction to Data Structures Previous Next Introduction to Algorithms