We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
DATA STRUCTURE DEFINITION
A data structure is a logical model of a particular organization of data. The choice of a
data structure depends on the following consideration :
(i) It must be able to represent the inherent relationship of the data in the real world.
(ii) Tt must be simple enough so that it can processed efficiently as and when necessary.
The study of data structure, includes :
(i) Logical description of the data structure
(ii) Implementation of the data structure
(ii) Quantitative analysis of data structure. This analysis includes determining the
amount of memory needed to store the data structure and the time required to
process it.
Description of Various Data Structures
Actually we divide the data structure into two categories :
(i) Linear data structure
(i) Non-linear data structure.
@ Linear data structure : The elements of a linear structure form a sequences i.e.,
linear list. Examples of linear data structure are Arrays, Linked lists, Stacks and
Queues.
(ii) Non-linear data structure : The elements of a non-linear data structure do not form
a sequence. Example of non-linear data structures are : Trees and Graphs.
‘So we can say we will discuss the following Data Structure :
> Arrays > Stacks —» Queues — Linked lists + Trees -» GraphsCONCEPT OF DATA TYPE
‘A data type is a collection of values and a set of operations that act on those values,
Whether our program is dealing with predefined data types or user defined types. These two
aspects must be considered :
@ Set of values
(i) Set of operations.
For example ; Consider an integer data type which consists of values (minint, ... ~ 3, ~ 2, ~
1, 0, 1, 2, 3, ... maxint}, where minint and maxint are the smallest and largest integers that
can be represented by an integer type on a particular computer.
Primitive Data Type
A primitive data type is a data type that is predefined. The predefined data type is also
known as built in data type. These primitive data types may be different for different
programming languages. For example, C programing language provides built in support for
integers (int, long), real (float, double) and char (characters).
Abstract Data Type
‘An abstract data type is a data type that is organized in such a way that the specification
of the values and the specification of the operation on those values are separated from the
representation of the values and the implementation of the operations. For example, consider
list abstract data type. A list is basically on collection of elements which can be ordered or
unordered. The primitive operations on a list may include :
(®) Adding new elements
(ii) Deleting elements
(iii) Determining number of elements in the list
(iv) Applying a particular process to each element in the list.
Here we are not concerned with how a list is represented and how the above mentioned
operation are implemented. We only need to know that it is a list whose element are of given
type and what can be do with the list.