Classification of Data Structures
Prof. Navya Francis
Asst. Professor
Kristu Jayanti College
Classification of Data Structures
• Primitive data structures
• Non-primitive data structures (linear and non-linear)
• Homogeneous and non-homogeneous data structures
• Static and dynamic data structures
1. Primitive data structures
These are the basic data structures and are directly operated upon by the
machine instructions.
They are integers, floating point numbers, characters, string constants,
pointers etc.
Like: int a =10;
The corresponding machine level code will be like:
store the int value in so and so location.
But if I write: int arr[10]=20;
The machine instruction doesn’t know array index 10! So, intermediate steps
will be there to convert this particular instruction to machine level.
2. Non-primitive data structures
• It is advanced data structure emphasizing on structuring of a group of data
items.
• They cannot be directly operated upon by the machine instructions.
• Example: Array, list, files, linked list, trees and graphs fall in this category.
Linear and non-linear data structures :
• In a linear data structure, the data items are arranged in a linear sequence.
• For example: array.
• In a non-linear data structure, the data items are not in sequence.
• For Example: trees and graphs.
3. Homogeneous and non-homogeneous
data structures
In homogeneous data structure, all the elements are of same type.
For Example: arrays.
In non-homogeneous data structure, the elements may or may not be
of the same type.
For Example: Records.
4. Static and dynamic data structures
• In Static data structure the size of the structure is fixed. The content
of the data structure can be modified but without changing the
memory space allocated to it.
• Example: Array
• In Dynamic data structure the size of the structure is not fixed and
can be modified during the operations performed on it. Dynamic data
structures are designed to facilitate change of data structures in the
run time.
• Example: Linked List
Operations on Data Structures
The most commonly used operations on data structure are broadly
categorized into following types:
1) Create:- The create operation results in reserving memory for program
elements. This can be done by declaration statement.
• Creation of data structure may take place either during compile-time or
run-time.
• Dynamic Memory Allocation in C can be done using malloc(), calloc(), free()
and realloc()
2) Destroy:- Destroy operation destroys memory space allocated for
specified data structure. free() function of C language is used to destroy data
structure.
3) Selection:- Selection operation deals with accessing a particular data
within a data structure.
4) Updation:- It updates or modifies the data in the data structure.
Operations on Data Structures
• 5) Searching:- It finds the presence of desired data item in the list of data
items, it may also find the locations of all elements that satisfy certain
conditions.
• 6) Sorting:- Sorting is a process of arranging all data items in a data
structure in a particular order, say for example, either in ascending order or
in descending order.
• 7) Merging:- Merging is a process of combining the data items of two
different non-primitive data structure into a single one.
• 8) Splitting:- Splitting is a process of partitioning single non-primitive data
structure to multiple ones.
• 9) Traversal:- Traversal is a process of visiting each and every node of a
non-primitive data structure in systematic manner.
THANK YOU

Data Structures: Classification of Data Structures

  • 1.
    Classification of DataStructures Prof. Navya Francis Asst. Professor Kristu Jayanti College
  • 2.
    Classification of DataStructures • Primitive data structures • Non-primitive data structures (linear and non-linear) • Homogeneous and non-homogeneous data structures • Static and dynamic data structures
  • 3.
    1. Primitive datastructures These are the basic data structures and are directly operated upon by the machine instructions. They are integers, floating point numbers, characters, string constants, pointers etc. Like: int a =10; The corresponding machine level code will be like: store the int value in so and so location. But if I write: int arr[10]=20; The machine instruction doesn’t know array index 10! So, intermediate steps will be there to convert this particular instruction to machine level.
  • 4.
    2. Non-primitive datastructures • It is advanced data structure emphasizing on structuring of a group of data items. • They cannot be directly operated upon by the machine instructions. • Example: Array, list, files, linked list, trees and graphs fall in this category. Linear and non-linear data structures : • In a linear data structure, the data items are arranged in a linear sequence. • For example: array. • In a non-linear data structure, the data items are not in sequence. • For Example: trees and graphs.
  • 5.
    3. Homogeneous andnon-homogeneous data structures In homogeneous data structure, all the elements are of same type. For Example: arrays. In non-homogeneous data structure, the elements may or may not be of the same type. For Example: Records.
  • 6.
    4. Static anddynamic data structures • In Static data structure the size of the structure is fixed. The content of the data structure can be modified but without changing the memory space allocated to it. • Example: Array • In Dynamic data structure the size of the structure is not fixed and can be modified during the operations performed on it. Dynamic data structures are designed to facilitate change of data structures in the run time. • Example: Linked List
  • 7.
    Operations on DataStructures The most commonly used operations on data structure are broadly categorized into following types: 1) Create:- The create operation results in reserving memory for program elements. This can be done by declaration statement. • Creation of data structure may take place either during compile-time or run-time. • Dynamic Memory Allocation in C can be done using malloc(), calloc(), free() and realloc() 2) Destroy:- Destroy operation destroys memory space allocated for specified data structure. free() function of C language is used to destroy data structure. 3) Selection:- Selection operation deals with accessing a particular data within a data structure. 4) Updation:- It updates or modifies the data in the data structure.
  • 8.
    Operations on DataStructures • 5) Searching:- It finds the presence of desired data item in the list of data items, it may also find the locations of all elements that satisfy certain conditions. • 6) Sorting:- Sorting is a process of arranging all data items in a data structure in a particular order, say for example, either in ascending order or in descending order. • 7) Merging:- Merging is a process of combining the data items of two different non-primitive data structure into a single one. • 8) Splitting:- Splitting is a process of partitioning single non-primitive data structure to multiple ones. • 9) Traversal:- Traversal is a process of visiting each and every node of a non-primitive data structure in systematic manner.
  • 9.