SlideShare a Scribd company logo
D A T A S T R U C T U R E S
Data:
Data are simply collection of facts and figures. Data are values or set of
values. A data item refers to a single unit of values.
Data items that are divided into sub items are group items; those that are not
are called elementary items. For example, a student’s name may be divided into
three sub items – [first name, middle name and last name] but the ID of a student
would normally be treated as a single item.
Student
ID Name Address Age Gender
First LastMiddle
Street Area
In the above example ( ID, Age, Gender, First, Middle, Last, Street, Area ) are
elementary data items, whereas (Name, Address ) are group data items.
An entity is something that has certain attributes or properties which may be
assigned values. The values themselves may be either numeric or non-numeric.
Example:
Attributes: Name Age Gender Social Society number
Values: Hamza 20 M 134-24-5533
Ali Rizwan 23 M 234-9988775
Fatima 20 F 345-7766443
Entities with similar attributes (e.g. all the employees in an organization)
form an entity set. Each attribute of an entity set has a range of values, the set of all
possible values that could be assigned to the particular attribute.
The term “information” is sometimes used for data with given attributes, of,
in other words meaningful or processed data.
A field is a single elementary unit of information representing an attribute of
an entity, a record is the collection of field values of a given entity and a file is the
collection of records of the entities in a given entity set.
Data Structure:
In computer science, a data structure is a particular way of storing and
organizing data in a computer’s memory so that it can be used efficiently. Data may
be organized in many different ways; the logical or mathematical model of a
particular organization of data is called a data structure. The choice of a particular
data model depends on the two considerations first; it must be rich enough in
structure to mirror the actual relationships of the data in the real world. On the other
hand, the structure should be simple enough that one can effectively process the
data whenever necessary.
D A T A S T R U C T U R E S
Categories of Data Structure:
The data structure can be classified in to major types:
 Linear Data Structure 
 Non-linear Data Structure 
1. Linear Data Structure:
A data structure is said to be linear if its elements form any sequence. There
are basically two ways of representing such linear structure in memory.
a) One way is to have the linear relationships between the elements represented
by means of sequential memory location. These linear structures are called
arrays.
b) The other way is to have the linear relationship between the elements
represented by means of pointers or links.
These linear structures are called linked lists. The
common examples of linear data structure are
 Arrays 
 Queues 
 Stacks 
 Linked lists 

2. Non-linear Data Structure:
This structure is mainly used to represent data containing a hierarchical
relationship between elements.
e.g. graphs, family trees and table of contents.
Arrays:
The simplest type of data structure is a linear (or one dimensional) array. A
list of a finite number n of similar data referenced respectively by a set of n
consecutive numbers, usually 1, 2, 3 . . . . . . . n. if we choose the name A for the
array, then the elements of A are denoted by subscript notation
A1, A2, A 3 . . . . An
or by the parenthesis notation A
(1), A (2), A (3) . . . . . . A (n)
or by the bracket notation
A [1], A [2], A [3] . . . . . . A [n]
Example:
A linear array A[8] consisting of numbers is pictured in following figure.
Linked List:
A linked list, or one way list is a linear collection of data elements, called
nodes, where the linear order is given by means of pointers. Each node is
divided into two parts:
 The first part contains the information of the element/node 
 The second part contains the address of the next node (link /next
pointer field) in the list. 
D A T A S T R U C T U R E S
There is a special pointer Start/List contains the address of first node in the
list. If this special pointer contains null, means that List is empty.
Example:
Tree:
Data frequently contain a hierarchical relationship between various elements.
The data structure which reflects this relationship is called a rooted tree graph or,
simply, a tree.
Student
ID# Name Address Age Gender
First Middle Last
Street Area
Graph:
Data sometimes contains a relationship between pairs of elements which is
not necessarily hierarchical in nature, e.g. an airline flights only between the cities
connected by lines. This data structure is called Graph.
Queue:
A queue, also called FIFO system, is a linear list in which deletions can take
place only at one end of the list, the Font of the list and insertion can take place
only at the other end Rear.
Stack:
It is an ordered group of homogeneous items of elements. Elements are added to
and removed from the top of the stack (the most recently added items are at the
top of the stack). The last element to be added is the first to be removed (LIFO:
Last In, First Out).
Data Structures Operations:
The data appearing in our data structures are processed by means of certain
operations. In fact, the particular data structure that one chooses for a given
situation depends largely in the frequency with which specific operations are
performed.
The following four operations play a major role in this text:
D A T A S T R U C T U R E S
 Traversing: accessing each record/node exactly once so
that certain items in the record may be processed. (This
accessing and processing is sometimes called “visiting”
the record.) 
 Searching: Finding the location of the desired node with a
given key value, or finding the locations of all such nodes
which satisfy one or more conditions. 
 Inserting: Adding a new node/record to the structure. 
 Deleting: Removing a node/record from the structure.

More Related Content

PDF
Introduction to Data Structure
PPTX
Key,ID Field and Tables Relationship
PPT
Lecture 1 data structures and algorithms
PPTX
Data structures
PPSX
Data Structure # vpmp polytechnic
PPTX
data structure
PPTX
Classification of datastructure.ppt
PDF
Glosario sistemas aplicados
Introduction to Data Structure
Key,ID Field and Tables Relationship
Lecture 1 data structures and algorithms
Data structures
Data Structure # vpmp polytechnic
data structure
Classification of datastructure.ppt
Glosario sistemas aplicados

What's hot (20)

PPTX
Glosario sistemas aplicados
DOC
DATA STRUCTURES - SHORT NOTES
PPTX
Data Structures
DOCX
Chapter 1
PPT
Chapter 8: tree data structure
PPTX
Introduction to data structure
PPTX
R Datatypes
PPTX
Data structure
PPT
PPTX
Spreadsheet basics ppt
PPT
Data struters
PPTX
Introduction to data structure
PPT
Chapter 1( intro & overview)
PPT
Data structures and Alogarithims
PPT
Lect 1-2
PPTX
Relational database terms
PDF
[Queue , linked list , tree]
PPT
Spreadhsheets 1
PPTX
Description of data
PPTX
Spreadsheet terminology
Glosario sistemas aplicados
DATA STRUCTURES - SHORT NOTES
Data Structures
Chapter 1
Chapter 8: tree data structure
Introduction to data structure
R Datatypes
Data structure
Spreadsheet basics ppt
Data struters
Introduction to data structure
Chapter 1( intro & overview)
Data structures and Alogarithims
Lect 1-2
Relational database terms
[Queue , linked list , tree]
Spreadhsheets 1
Description of data
Spreadsheet terminology
Ad

Viewers also liked (14)

PPT
Presentación inducción
PPTX
ANKIT final
PDF
Periódico Triduo Pascual
PPTX
PDF
Reglas de juego fifa 2013 2014
PPTX
Proyectos futuropa 2011
PPTX
Población inicial del ecuador aborigem
ODP
/Home/usuario/.confi/mis trabajos del gimp
DOCX
Responde las siguientes preguntas salida
PPS
Graficos
PPS
Presupuestos educación 2010 vs 2011
 
PPS
Miércoles de ceniza
PPSX
11 Contemporary Coffee Table Decor Ideas
Presentación inducción
ANKIT final
Periódico Triduo Pascual
Reglas de juego fifa 2013 2014
Proyectos futuropa 2011
Población inicial del ecuador aborigem
/Home/usuario/.confi/mis trabajos del gimp
Responde las siguientes preguntas salida
Graficos
Presupuestos educación 2010 vs 2011
 
Miércoles de ceniza
11 Contemporary Coffee Table Decor Ideas
Ad

Similar to Data structures introduction (20)

PDF
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
PPTX
Dsa unit 1
PPTX
Introduction to data structures (ss)
PPTX
DSA Ch1(Introduction) [Recovered].pptx
PPTX
DSA - Copy.pptx
PPT
Lect 1-2 Zaheer Abbas
PDF
Datastructures Notes
PDF
3130703dsgtudarshan Enotesallunits Darshan Institute Of Engineering Technology
PPTX
Unit-1 DataStructure Intro.pptx
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
PPTX
DataStructurePpt-01.pptxEngineering data structure notes
PPTX
UNIT 3.pptx-Data Structures definition with examples
PPTX
Introduction to Data Structure
PPTX
DataStructurePpt.pptx
PDF
2. Introduction to Data Structure.pdf
PPTX
Data structure unitfirst part1
PPTX
Data structure unitfirst part1
PPTX
Lecture 1. Data Structure & Algorithm.pptx
PPT
Unit 1.ppt
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
Dsa unit 1
Introduction to data structures (ss)
DSA Ch1(Introduction) [Recovered].pptx
DSA - Copy.pptx
Lect 1-2 Zaheer Abbas
Datastructures Notes
3130703dsgtudarshan Enotesallunits Darshan Institute Of Engineering Technology
Unit-1 DataStructure Intro.pptx
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
DataStructurePpt-01.pptxEngineering data structure notes
UNIT 3.pptx-Data Structures definition with examples
Introduction to Data Structure
DataStructurePpt.pptx
2. Introduction to Data Structure.pdf
Data structure unitfirst part1
Data structure unitfirst part1
Lecture 1. Data Structure & Algorithm.pptx
Unit 1.ppt

More from maamir farooq (20)

DOCX
Ooad lab1
PPT
Lesson 03
PPT
Lesson 02
PDF
Php client libray
PDF
Swiftmailer
PDF
PDF
PPTX
PDF
PDF
J query 1.7 cheat sheet
PDF
Assignment
PDF
Java script summary
PDF
PDF
PPTX
PPTX
Css summary
DOCX
Manual of image processing lab
PDF
Session management
PDF
Data management
PPTX
Content provider
Ooad lab1
Lesson 03
Lesson 02
Php client libray
Swiftmailer
J query 1.7 cheat sheet
Assignment
Java script summary
Css summary
Manual of image processing lab
Session management
Data management
Content provider

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Basic Mud Logging Guide for educational purpose
PDF
Complications of Minimal Access Surgery at WLH
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Computing-Curriculum for Schools in Ghana
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Insiders guide to clinical Medicine.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
01-Introduction-to-Information-Management.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Basic Mud Logging Guide for educational purpose
Complications of Minimal Access Surgery at WLH
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
TR - Agricultural Crops Production NC III.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Computing-Curriculum for Schools in Ghana
VCE English Exam - Section C Student Revision Booklet
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Insiders guide to clinical Medicine.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
01-Introduction-to-Information-Management.pdf
RMMM.pdf make it easy to upload and study
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O7-L3 Supply Chain Operations - ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx

Data structures introduction

  • 1. D A T A S T R U C T U R E S Data: Data are simply collection of facts and figures. Data are values or set of values. A data item refers to a single unit of values. Data items that are divided into sub items are group items; those that are not are called elementary items. For example, a student’s name may be divided into three sub items – [first name, middle name and last name] but the ID of a student would normally be treated as a single item. Student ID Name Address Age Gender First LastMiddle Street Area In the above example ( ID, Age, Gender, First, Middle, Last, Street, Area ) are elementary data items, whereas (Name, Address ) are group data items. An entity is something that has certain attributes or properties which may be assigned values. The values themselves may be either numeric or non-numeric. Example: Attributes: Name Age Gender Social Society number Values: Hamza 20 M 134-24-5533 Ali Rizwan 23 M 234-9988775 Fatima 20 F 345-7766443 Entities with similar attributes (e.g. all the employees in an organization) form an entity set. Each attribute of an entity set has a range of values, the set of all possible values that could be assigned to the particular attribute. The term “information” is sometimes used for data with given attributes, of, in other words meaningful or processed data. A field is a single elementary unit of information representing an attribute of an entity, a record is the collection of field values of a given entity and a file is the collection of records of the entities in a given entity set. Data Structure: In computer science, a data structure is a particular way of storing and organizing data in a computer’s memory so that it can be used efficiently. Data may be organized in many different ways; the logical or mathematical model of a particular organization of data is called a data structure. The choice of a particular data model depends on the two considerations first; it must be rich enough in structure to mirror the actual relationships of the data in the real world. On the other hand, the structure should be simple enough that one can effectively process the data whenever necessary.
  • 2. D A T A S T R U C T U R E S Categories of Data Structure: The data structure can be classified in to major types:  Linear Data Structure   Non-linear Data Structure  1. Linear Data Structure: A data structure is said to be linear if its elements form any sequence. There are basically two ways of representing such linear structure in memory. a) One way is to have the linear relationships between the elements represented by means of sequential memory location. These linear structures are called arrays. b) The other way is to have the linear relationship between the elements represented by means of pointers or links. These linear structures are called linked lists. The common examples of linear data structure are  Arrays   Queues   Stacks   Linked lists   2. Non-linear Data Structure: This structure is mainly used to represent data containing a hierarchical relationship between elements. e.g. graphs, family trees and table of contents. Arrays: The simplest type of data structure is a linear (or one dimensional) array. A list of a finite number n of similar data referenced respectively by a set of n consecutive numbers, usually 1, 2, 3 . . . . . . . n. if we choose the name A for the array, then the elements of A are denoted by subscript notation A1, A2, A 3 . . . . An or by the parenthesis notation A (1), A (2), A (3) . . . . . . A (n) or by the bracket notation A [1], A [2], A [3] . . . . . . A [n] Example: A linear array A[8] consisting of numbers is pictured in following figure. Linked List: A linked list, or one way list is a linear collection of data elements, called nodes, where the linear order is given by means of pointers. Each node is divided into two parts:  The first part contains the information of the element/node   The second part contains the address of the next node (link /next pointer field) in the list. 
  • 3. D A T A S T R U C T U R E S There is a special pointer Start/List contains the address of first node in the list. If this special pointer contains null, means that List is empty. Example: Tree: Data frequently contain a hierarchical relationship between various elements. The data structure which reflects this relationship is called a rooted tree graph or, simply, a tree. Student ID# Name Address Age Gender First Middle Last Street Area Graph: Data sometimes contains a relationship between pairs of elements which is not necessarily hierarchical in nature, e.g. an airline flights only between the cities connected by lines. This data structure is called Graph. Queue: A queue, also called FIFO system, is a linear list in which deletions can take place only at one end of the list, the Font of the list and insertion can take place only at the other end Rear. Stack: It is an ordered group of homogeneous items of elements. Elements are added to and removed from the top of the stack (the most recently added items are at the top of the stack). The last element to be added is the first to be removed (LIFO: Last In, First Out). Data Structures Operations: The data appearing in our data structures are processed by means of certain operations. In fact, the particular data structure that one chooses for a given situation depends largely in the frequency with which specific operations are performed. The following four operations play a major role in this text:
  • 4. D A T A S T R U C T U R E S  Traversing: accessing each record/node exactly once so that certain items in the record may be processed. (This accessing and processing is sometimes called “visiting” the record.)   Searching: Finding the location of the desired node with a given key value, or finding the locations of all such nodes which satisfy one or more conditions.   Inserting: Adding a new node/record to the structure.   Deleting: Removing a node/record from the structure.