Classification of data structure
Published by: Anil K. Panta
Data structures are special ways to store and organize data in a computer so that it can be used efficiently. They help us manage large amounts of information in a structured and useful way.
Data Structure is mainly classified into two types:
Primitive Data Structure and
Non Primitive Data Structure.
Here is a detailed classification of a data structure.
1. Primitive Data Structures
Primitive data structures are the basic types of data that most programming languages use. These are simple and directly supported by the computer system.
Examples of Primitive Data Structures:
Integer – Whole numbers like 1, 2, 100
Float – Decimal numbers like 3.14, 9.8
Character – Single letters or symbols like ‘A’, ‘@’
Boolean – True or False values (used in logic)
String – A group of characters like “Hello”
Other primitive types – May include long, double, etc., depending on the language
2. Non-Primitive Data Structures
Non-primitive data structures are more complex. They are used to store multiple values or large amounts of data efficiently. These can be further divided into two categories:
a. Linear Data Structures
In a linear data structure, elements are arranged in a straight line or sequence. You can access the data one after another.
Examples of Linear Data Structure:
Array – A collection of items stored at continuous memory locations
List – A group of elements linked together (can grow/shrink)
Stack – Follows the rule Last In, First Out (LIFO)
Queue – Follows the rule First In, First Out (FIFO)
Hash Table – Stores key-value pairs for fast searching
b. Non-Linear Data Structures
In non-linear data structures, elements are not stored in a sequence. Instead, they are stored in a hierarchical or interconnected manner.
Examples of Non Linear Data Structure:
Tree – Like a family tree where one item leads to multiple others
Graph – A structure where items are connected like points on a map