Datastructure
Datastructure
to
Data Structures
Definition
Data: Collection of raw facts.
Data structure is representation of the logical
relationship existing between individual
elements of data.
Data structure is a specialized format for
organizing and storing data in memory that
considers not only the elements stored but also
their relationship to each other.
Prof. K. Adisesha 2
Introduction
Prof. K. Adisesha 3
Classification of Data Structure
Data structure are normally divided into
two broad categories:
◦ Primitive Data Structure
◦ Non-Primitive Data Structure
Prof. K. Adisesha 4
Classification of Data Structure
Prof. K. Adisesha 5
Primitive Data Structure
There are basic structures and directly
operated upon by the machine instructions.
Data structures that are directly operated
upon the machine-level instructions are
known as primitive data structures.
Integer, Floating-point number, Character
constants, string constants, pointers etc, fall
in this category.
Prof. K. Adisesha 6
Primitive Data Structure
The most commonly used operation on data
structure are broadly categorized into
following types:
◦ Create
◦ Selection
◦ Updating
◦ Destroy or Delete
Prof. K. Adisesha 7
Non-Primitive Data Structure
There are more sophisticated data
structures.
The Data structures that are derived from the
primitive data structures are called Non-primitive
data structure.
The non-primitive data structures
emphasize on structuring of a group of
homogeneous (same type) or heterogeneous
(different type) data items.
Prof. K. Adisesha 8
Non-Primitive Data Structure
Linear Data structures:
◦ Linear Data structures are kind of data structure that has homogeneous
elements.
◦ The data structure in which elements are in a sequence and form a liner
series.
◦ Linear data structures are very easy to implement, since the memory of the
computer is also organized in a linear fashion.
◦ Some commonly used linear data structures are Stack, Queue and Linked
Lists.
Non-Linear Data structures:
◦ A Non-Linear Data structures is a data structure in which data item is
connected to several other data items.
◦ Non-Linear data structure may exhibit either a hierarchical relationship or
parent child relationship.
◦ The data elements are not arranged in a sequential structure.
◦ The different non-linear data structures are trees and graphs.
Prof. K. Adisesha 9
Non-Primitive Data Structure
The most commonly used operation on data
structure are broadly categorized into
following types:
◦ Traversal
◦ Insertion
◦ Selection
◦ Searching
◦ Sorting
◦ Merging
◦ Destroy or Delete
Prof. K. Adisesha 10
Different between them
A primitive data structure is generally a
basic structure that is usually built into the
language, such as an integer, a float.
Prof. K. Adisesha 11