Classification of Data Structure
Classification of Data Structure
A Data Structure, as the name suggests, is a method to store data in a structured way so that it can be easily created, viewed, and managed.
Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
Linus Torvalds
How do we classify data structures?
Data Structures are generally classified into two classes:

Primitive Data Structures

Nonprimitive Data Structures
Primitive Data Structures
Primitive Data Structures are the fundamental data types which are supported by programming language. They are created without the support of other data structure as a support or tool. Examples:
 Integer
 Real (float)
 Characters
 Booleans
Note: Between the two major classification of data structure, primitive data structure is less choose due to its inflexible nature.
NonPrimitive Data Structures
Nonprimitive Data Structures are created using primitive data structures. Nonprimitive data structures are more complicated data structures and are derived from primitive data structures.These Data Structures can be designed by users.
Examples:
 Lists
 Graphs
 Stacks
 Trees
Due to its flexible nature, between the two major classification of data structure, Nonprimitive data structure is choosen more.
NonPrimitive Data Structures can further be classified into two categories:

Linear Data Structures

NonLinear Data Structures
Linear Data Structures
In a Linear Data Structure, the elements of Data Structure are stored in a linear or sequential order. Examples:
 Arrays
 Linked Lists
 Stacks:
Stack is a linear data structure where the addition of new items and the removal of existing items always takes place at the same end. This end is commonly called as "top". As all the addition and removal in a stack is done from the "top" of the stack, the item added most recently will be removed first. Hence stack is called LastInFirstOut(LIFO) data structure.
 Queues
NonLinear Data Structures
If the elements of a Data Structure are not stored in a sequential order, then it is a NonLinear Data Structure. Examples:
 Trees
 Graphs