Data Structure
Data Structure
Chapter 1 Introduction
In linear data structure, data elements can While in non-linear data structure, data
be traversed in a single run only elements can't be traversed in a single run
only
Its example are: array, stack , queue, link- While its examples are: trees and graphs
list etc.
Data
• Homogeneous data: Homogeneous data structures are those data
structures that contain only similar type of data e.g. like a data structure
containing only integer or float values. The simplest example of such type
of data structures is an Array.
• Heterogeneous Data: Heterogeneous Data Structures are those data
structures that contains a variety or dissimilar type of data, for e.g. a data
structure that can contain various data of different data types like integer,
float and character. The examples of such data structures include
structures, union etc.
Common Operations on Data
Structures
• Insertion
– The operation that add a new data element item in a data structure
• Deletion
– Deletion operation removes a data elements from a data structure
• Traversing
– Accessing each data element in a data structure in order to perform some data
processing.
• Searching
– Finding data elements in a structure that contains some value or meets some search
criteria or condition.
• Sorting
– Arranging data elements in some order. For example, ascending or descending order.
– Sorting data has many useful applications.
• Merging
– Combining records in two different data structures in to one data structure.