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

What's hot (20)

PPTX
Glosario sistemas aplicados
Carolina Guevara
 
DOC
DATA STRUCTURES - SHORT NOTES
suthi
 
PPTX
Data Structures
Nitesh Bichwani
 
DOCX
Chapter 1
Radhika Puttewar
 
PPT
Chapter 8: tree data structure
Mahmoud Alfarra
 
PPTX
Introduction to data structure
sunilchute1
 
PPTX
R Datatypes
DataminingTools Inc
 
PPTX
Data structure
MdArifHossain30
 
PPT
Lists
Ghaffar Khan
 
PPTX
Spreadsheet basics ppt
Tammy Carter
 
PPT
Data struters
ashish bansal
 
PPTX
Introduction to data structure
NUPOORAWSARMOL
 
PPT
Chapter 1( intro & overview)
MUHAMMAD AAMIR
 
PPT
Data structures and Alogarithims
Victor Palmar
 
PPT
Lect 1-2
Zaheer Aghani
 
PPTX
Relational database terms
SanthiNivas
 
PDF
[Queue , linked list , tree]
Nowrin Nishat
 
PPT
Spreadhsheets 1
Jason Hando
 
PPTX
Description of data
Johnna Mae Yodico
 
PPTX
Spreadsheet terminology
Tammy Carter
 
Glosario sistemas aplicados
Carolina Guevara
 
DATA STRUCTURES - SHORT NOTES
suthi
 
Data Structures
Nitesh Bichwani
 
Chapter 1
Radhika Puttewar
 
Chapter 8: tree data structure
Mahmoud Alfarra
 
Introduction to data structure
sunilchute1
 
R Datatypes
DataminingTools Inc
 
Data structure
MdArifHossain30
 
Spreadsheet basics ppt
Tammy Carter
 
Data struters
ashish bansal
 
Introduction to data structure
NUPOORAWSARMOL
 
Chapter 1( intro & overview)
MUHAMMAD AAMIR
 
Data structures and Alogarithims
Victor Palmar
 
Lect 1-2
Zaheer Aghani
 
Relational database terms
SanthiNivas
 
[Queue , linked list , tree]
Nowrin Nishat
 
Spreadhsheets 1
Jason Hando
 
Description of data
Johnna Mae Yodico
 
Spreadsheet terminology
Tammy Carter
 

Viewers also liked (14)

PPT
Presentación inducción
kelijiu10
 
PPTX
ANKIT final
Ankit Verma
 
PDF
Periódico Triduo Pascual
Parroquialainmaculada
 
PPTX
TAREA6
Jéssica Soria
 
PDF
Reglas de juego fifa 2013 2014
EMILIO CASTAÑEDA ESCAREÑO
 
PPTX
Proyectos futuropa 2011
Profimercadeo - Marketing Consultants
 
PPTX
Población inicial del ecuador aborigem
Daniel Peralta
 
ODP
/Home/usuario/.confi/mis trabajos del gimp
lorenzoilie
 
DOCX
Responde las siguientes preguntas salida
paulino123
 
PPS
Graficos
albatrespalacio
 
PPS
Presupuestos educación 2010 vs 2011
n/a
 
PPS
Miércoles de ceniza
Parroquialainmaculada
 
PPSX
11 Contemporary Coffee Table Decor Ideas
Purna Chandra Swain
 
Presentación inducción
kelijiu10
 
ANKIT final
Ankit Verma
 
Periódico Triduo Pascual
Parroquialainmaculada
 
Reglas de juego fifa 2013 2014
EMILIO CASTAÑEDA ESCAREÑO
 
Proyectos futuropa 2011
Profimercadeo - Marketing Consultants
 
Población inicial del ecuador aborigem
Daniel Peralta
 
/Home/usuario/.confi/mis trabajos del gimp
lorenzoilie
 
Responde las siguientes preguntas salida
paulino123
 
Graficos
albatrespalacio
 
Presupuestos educación 2010 vs 2011
n/a
 
Miércoles de ceniza
Parroquialainmaculada
 
11 Contemporary Coffee Table Decor Ideas
Purna Chandra Swain
 
Ad

Similar to Data structures introduction (20)

PPT
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
Venugopalavarma Raja
 
PDF
2. Introduction to Data Structure.pdf
SulabhPawaia
 
PPTX
Dsa unit 1
thamizh arasi
 
PDF
UNITIII LDS.pdf
meenamadhuvandhi2
 
PPTX
DATA STRUCTURE IN C LANGUAGE
shubhamrohiwal6
 
PPTX
C++ Data Structure PPT.pptx
Mukesh Thakur
 
PPT
C++ Data Structure PPT.ppt
Mukesh Thakur
 
DOCX
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Malikireddy Bramhananda Reddy
 
PPT
data structure programing language in c.ppt
LavkushGupta12
 
PPTX
Data structure & algorithms introduction
Sugandh Wafai
 
PPT
DS_PPT.ppt
MeghaKulkarni27
 
PPT
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
yarotos643
 
PPT
data structure details of types and .ppt
poonamsngr
 
PPTX
DSA - Copy.pptx
BishalChowdhury10
 
PPT
1597380885789.ppt
PraveenKumar977108
 
PPTX
Data Structure Introduction- Arrays, Matrix, Linked List
JasmineJinitha
 
PPTX
Data Structures and algoithms Unit - 1.pptx
mexiuro901
 
PPTX
Data Types - Premetive and Non Premetive
Raj Naik
 
PPT
Ch 1 intriductions
irshad17
 
PPTX
Data structures
KarthiKeyan462713
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
Venugopalavarma Raja
 
2. Introduction to Data Structure.pdf
SulabhPawaia
 
Dsa unit 1
thamizh arasi
 
UNITIII LDS.pdf
meenamadhuvandhi2
 
DATA STRUCTURE IN C LANGUAGE
shubhamrohiwal6
 
C++ Data Structure PPT.pptx
Mukesh Thakur
 
C++ Data Structure PPT.ppt
Mukesh Thakur
 
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Malikireddy Bramhananda Reddy
 
data structure programing language in c.ppt
LavkushGupta12
 
Data structure & algorithms introduction
Sugandh Wafai
 
DS_PPT.ppt
MeghaKulkarni27
 
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
yarotos643
 
data structure details of types and .ppt
poonamsngr
 
DSA - Copy.pptx
BishalChowdhury10
 
1597380885789.ppt
PraveenKumar977108
 
Data Structure Introduction- Arrays, Matrix, Linked List
JasmineJinitha
 
Data Structures and algoithms Unit - 1.pptx
mexiuro901
 
Data Types - Premetive and Non Premetive
Raj Naik
 
Ch 1 intriductions
irshad17
 
Data structures
KarthiKeyan462713
 
Ad

More from maamir farooq (20)

DOCX
Ooad lab1
maamir farooq
 
PPT
Lesson 03
maamir farooq
 
PPT
Lesson 02
maamir farooq
 
PDF
Php client libray
maamir farooq
 
PDF
Swiftmailer
maamir farooq
 
PDF
Lect15
maamir farooq
 
PDF
Lec 7
maamir farooq
 
PPTX
Lec 6
maamir farooq
 
PDF
Lec 5
maamir farooq
 
PDF
J query 1.7 cheat sheet
maamir farooq
 
PDF
Assignment
maamir farooq
 
PDF
Java script summary
maamir farooq
 
PDF
Lec 3
maamir farooq
 
PDF
Lec 2
maamir farooq
 
PPTX
Lec 1
maamir farooq
 
PPTX
Css summary
maamir farooq
 
DOCX
Manual of image processing lab
maamir farooq
 
PDF
Session management
maamir farooq
 
PDF
Data management
maamir farooq
 
PPTX
Content provider
maamir farooq
 
Ooad lab1
maamir farooq
 
Lesson 03
maamir farooq
 
Lesson 02
maamir farooq
 
Php client libray
maamir farooq
 
Swiftmailer
maamir farooq
 
J query 1.7 cheat sheet
maamir farooq
 
Assignment
maamir farooq
 
Java script summary
maamir farooq
 
Css summary
maamir farooq
 
Manual of image processing lab
maamir farooq
 
Session management
maamir farooq
 
Data management
maamir farooq
 
Content provider
maamir farooq
 

Recently uploaded (20)

PDF
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PDF
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
DOCX
Lesson 1 - Nature and Inquiry of Research
marvinnbustamante1
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PPTX
Natural Language processing using nltk.pptx
Ramakrishna Reddy Bijjam
 
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
PPTX
Ward Management: Patient Care, Personnel, Equipment, and Environment.pptx
PRADEEP ABOTHU
 
PPTX
ENGLISH 8 REVISED K-12 CURRICULUM QUARTER 1 WEEK 1
LeomarrYsraelArzadon
 
PPTX
How to Manage Wins & Losses in Odoo 18 CRM
Celine George
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
PPTX
Marketing Management PPT Unit 1 and Unit 2.pptx
Sri Ramakrishna College of Arts and science
 
PDF
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
PDF
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
PDF
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
PDF
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
 
PDF
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
PPTX
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
I3PM Case study smart parking 2025 with uptoIP® and ABP
MIPLM
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
Lesson 1 - Nature and Inquiry of Research
marvinnbustamante1
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
Natural Language processing using nltk.pptx
Ramakrishna Reddy Bijjam
 
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
Ward Management: Patient Care, Personnel, Equipment, and Environment.pptx
PRADEEP ABOTHU
 
ENGLISH 8 REVISED K-12 CURRICULUM QUARTER 1 WEEK 1
LeomarrYsraelArzadon
 
How to Manage Wins & Losses in Odoo 18 CRM
Celine George
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
Marketing Management PPT Unit 1 and Unit 2.pptx
Sri Ramakrishna College of Arts and science
 
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
 
Lesson 1 - Nature of Inquiry and Research.pdf
marvinnbustamante1
 
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 

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.