SlideShare a Scribd company logo
1 of 15
INTRODUCTION TO DATA
STRUCTURE
Ms Nupoor Awsarmol
Computer Science Department
Definition
TO DESIGN AND IMPLEMENTATION OF ALGORITHMS AND FOR
DEVELOPMENT OF PROGRAM, ORGANIZATION OF DATA IS
IMPORTANT
LOGICAL OR MATHEMATICAL MODEL OF A PARTICULAR
ORGANIZATION OF DATA IS CALLED DATA STRUCTURE.
ALGORITHMS + DATA STRUCTURE=PROGRAMS
Data Structure Are Classified Into
Two Types
1. Primitive Data Structure
2. Non-primitive Data Structure
DATA STRUCTURE
Primitive Data Type
Non Primitive Data
Type
Integer Float Character Pointer
Non Primitive Data Type
Array Stack
Non Primitive Data TypeNon Primitive Data Type
Queue TreeGraph
Link
List
ARRAY
LINKED LIST
TREE
QUEUE STACK
Types of Data Structure
 Primitive data structures are those which are predefined
way of storing data by the system.
 The set of operations that can be performed on these
data are also predefined.
 Primitive data structures are character, integer, float,
pointer.
Primitive Data Type
Non Primitive Data Type
The data types that are derived from primary data types are
known as non-primitive data types.
These data types are used to store group of values.
The non-primitive data types are
 Arrays
 Structure
 Linked list
 Stacks
 Queue
Array
ARRAY is a set of finite collection of homogeneous or same types of data items.
Which means that we can store only one type of data in the array.
We can declare array as : int ARR[14]
Int specifies the type of data we want to store in array.
ARR is the name of ARRAY.
The number inside the square bracket denotes the number of items or elements
stored in ARRAY. It is called as the length or size of ARRAY.
Linked List
A link list or one way list is a linear collection of data elements,
called nodes, where the linear order is given by means of pointer.
It is divided into two parts: First part contains the information of
element and second part contains the address of the next node.
START
Information
Part
Next pointer field
Stack
 A stack is a linear structure in which items are added or removed only at one end.
 It is also known as “LAST IN FIRST OUT” [LIFO] lists.
 Stack is also known as “PILES” and “ PUSH DOWN ” lists.
 OPERATION ASSOCIATED WITH STACK
1. PUSH: It is used to insert an element into stack.
2. POP: It is used to remove or delete an element from a stack.
Representation of Stack
TOP FFF
DDD
CCC
BBB
AAA
XXX YYY ZZZ
1 2 3 4 65 87
1
TOP
Queue
A queue is also called as FIRST IN FIRST OUT [FIFO] system.
It is a linear list in which deletion can take place only at one end of the list i.e.
“FRONT” of the list
In queue Insertion can take place only at other end of the list. i.e. “REAR”
Figure : Array Representation Of Queue
AAA BBB CCC …………DDD
1 32 4 5 N
Front=1
Rear = 4
Non-Linear Data Structure
1. TREE : It is a non linear is mainly used to represent data
containing a hierarchical relationship between elements.
2. GRAPH : Data sometimes contains relationship between pair of
elements which is not hierarchical in nature is called a graph .
A
B C
D
D
D D
D
THANK YOU!!

More Related Content

What's hot

Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure pptNalinNishant3
 
Glosario sistemas aplicados
Glosario sistemas aplicadosGlosario sistemas aplicados
Glosario sistemas aplicadosCarolina Guevara
 
Glosario sistemas aplicados
Glosario sistemas aplicadosGlosario sistemas aplicados
Glosario sistemas aplicadoscamiquinchis
 
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....Shail Nakum
 
Linked stacks and queues
Linked stacks and queuesLinked stacks and queues
Linked stacks and queuesRamzi Alqrainy
 
Ds important questions
Ds important questionsDs important questions
Ds important questionsLavanyaJ28
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using pythonLavanyaJ28
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked listLavanyaJ28
 
data structure
data structuredata structure
data structurehashim102
 
Bca ii dfs u-2 linklist,stack,queue
Bca ii  dfs u-2 linklist,stack,queueBca ii  dfs u-2 linklist,stack,queue
Bca ii dfs u-2 linklist,stack,queueRai University
 
structures and unions in 'C'
structures and unions in 'C'structures and unions in 'C'
structures and unions in 'C'illpa
 
Introduction of Data Structure
Introduction of Data StructureIntroduction of Data Structure
Introduction of Data StructureMandavi Classes
 

What's hot (20)

Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
Linked list
Linked listLinked list
Linked list
 
Linked list
Linked listLinked list
Linked list
 
Glosario sistemas aplicados
Glosario sistemas aplicadosGlosario sistemas aplicados
Glosario sistemas aplicados
 
Faq dbms
Faq dbmsFaq dbms
Faq dbms
 
Glosario sistemas aplicados
Glosario sistemas aplicadosGlosario sistemas aplicados
Glosario sistemas aplicados
 
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
TYPES DATA STRUCTURES( LINEAR AND NON LINEAR)....
 
Linked stacks and queues
Linked stacks and queuesLinked stacks and queues
Linked stacks and queues
 
Ds important questions
Ds important questionsDs important questions
Ds important questions
 
Linked list
Linked listLinked list
Linked list
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using python
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked list
 
Data structure
Data structureData structure
Data structure
 
data structure
data structuredata structure
data structure
 
Lecture 2c stacks
Lecture 2c stacksLecture 2c stacks
Lecture 2c stacks
 
Bca ii dfs u-2 linklist,stack,queue
Bca ii  dfs u-2 linklist,stack,queueBca ii  dfs u-2 linklist,stack,queue
Bca ii dfs u-2 linklist,stack,queue
 
Spreadsheet
SpreadsheetSpreadsheet
Spreadsheet
 
structures and unions in 'C'
structures and unions in 'C'structures and unions in 'C'
structures and unions in 'C'
 
Struktur data ppt
Struktur data pptStruktur data ppt
Struktur data ppt
 
Introduction of Data Structure
Introduction of Data StructureIntroduction of Data Structure
Introduction of Data Structure
 

Similar to Introduction to data structure

Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure NUPOORAWSARMOL
 
introductiontodatastructure2-191017090115.pptx
introductiontodatastructure2-191017090115.pptxintroductiontodatastructure2-191017090115.pptx
introductiontodatastructure2-191017090115.pptxZISAN5
 
Data Structure
Data Structure Data Structure
Data Structure Ibrahim MH
 
DATA STRUCTURE IN C LANGUAGE
DATA STRUCTURE IN C LANGUAGEDATA STRUCTURE IN C LANGUAGE
DATA STRUCTURE IN C LANGUAGEshubhamrohiwal6
 
Classification of datastructure.ppt
Classification of datastructure.pptClassification of datastructure.ppt
Classification of datastructure.pptLakshmiSamivel
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data StructureJazz Jinia Bhowmik
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.pptLavkushGupta12
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its typesRameesha Sadaqat
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxmexiuro901
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEVenugopalavarma Raja
 
Data Structure using c language for beginners
Data Structure using c language for beginners Data Structure using c language for beginners
Data Structure using c language for beginners Vinayak SofTech
 
data structure details of types and .ppt
data structure details of types and .pptdata structure details of types and .ppt
data structure details of types and .pptpoonamsngr
 
STACK, LINKED LIST ,AND QUEUE
STACK, LINKED LIST ,AND QUEUESTACK, LINKED LIST ,AND QUEUE
STACK, LINKED LIST ,AND QUEUEDev Chauhan
 

Similar to Introduction to data structure (20)

Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
 
introductiontodatastructure2-191017090115.pptx
introductiontodatastructure2-191017090115.pptxintroductiontodatastructure2-191017090115.pptx
introductiontodatastructure2-191017090115.pptx
 
Data Structure
Data Structure Data Structure
Data Structure
 
DATA STRUCTURE IN C LANGUAGE
DATA STRUCTURE IN C LANGUAGEDATA STRUCTURE IN C LANGUAGE
DATA STRUCTURE IN C LANGUAGE
 
Intro ds
Intro dsIntro ds
Intro ds
 
Classification of datastructure.ppt
Classification of datastructure.pptClassification of datastructure.ppt
Classification of datastructure.ppt
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
 
DS_PPT.ppt
DS_PPT.pptDS_PPT.ppt
DS_PPT.ppt
 
UNITIII LDS.pdf
UNITIII LDS.pdfUNITIII LDS.pdf
UNITIII LDS.pdf
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.ppt
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its types
 
Data Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptxData Structures and algoithms Unit - 1.pptx
Data Structures and algoithms Unit - 1.pptx
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
 
Data Structure using c language for beginners
Data Structure using c language for beginners Data Structure using c language for beginners
Data Structure using c language for beginners
 
data structure details of types and .ppt
data structure details of types and .pptdata structure details of types and .ppt
data structure details of types and .ppt
 
STACK, LINKED LIST ,AND QUEUE
STACK, LINKED LIST ,AND QUEUESTACK, LINKED LIST ,AND QUEUE
STACK, LINKED LIST ,AND QUEUE
 

Recently uploaded

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 

Recently uploaded (20)

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 

Introduction to data structure

  • 1. INTRODUCTION TO DATA STRUCTURE Ms Nupoor Awsarmol Computer Science Department
  • 2. Definition TO DESIGN AND IMPLEMENTATION OF ALGORITHMS AND FOR DEVELOPMENT OF PROGRAM, ORGANIZATION OF DATA IS IMPORTANT LOGICAL OR MATHEMATICAL MODEL OF A PARTICULAR ORGANIZATION OF DATA IS CALLED DATA STRUCTURE. ALGORITHMS + DATA STRUCTURE=PROGRAMS
  • 3. Data Structure Are Classified Into Two Types 1. Primitive Data Structure 2. Non-primitive Data Structure
  • 4. DATA STRUCTURE Primitive Data Type Non Primitive Data Type Integer Float Character Pointer
  • 5. Non Primitive Data Type Array Stack Non Primitive Data TypeNon Primitive Data Type Queue TreeGraph Link List
  • 7.  Primitive data structures are those which are predefined way of storing data by the system.  The set of operations that can be performed on these data are also predefined.  Primitive data structures are character, integer, float, pointer. Primitive Data Type
  • 8. Non Primitive Data Type The data types that are derived from primary data types are known as non-primitive data types. These data types are used to store group of values. The non-primitive data types are  Arrays  Structure  Linked list  Stacks  Queue
  • 9. Array ARRAY is a set of finite collection of homogeneous or same types of data items. Which means that we can store only one type of data in the array. We can declare array as : int ARR[14] Int specifies the type of data we want to store in array. ARR is the name of ARRAY. The number inside the square bracket denotes the number of items or elements stored in ARRAY. It is called as the length or size of ARRAY.
  • 10. Linked List A link list or one way list is a linear collection of data elements, called nodes, where the linear order is given by means of pointer. It is divided into two parts: First part contains the information of element and second part contains the address of the next node. START Information Part Next pointer field
  • 11. Stack  A stack is a linear structure in which items are added or removed only at one end.  It is also known as “LAST IN FIRST OUT” [LIFO] lists.  Stack is also known as “PILES” and “ PUSH DOWN ” lists.  OPERATION ASSOCIATED WITH STACK 1. PUSH: It is used to insert an element into stack. 2. POP: It is used to remove or delete an element from a stack.
  • 12. Representation of Stack TOP FFF DDD CCC BBB AAA XXX YYY ZZZ 1 2 3 4 65 87 1 TOP
  • 13. Queue A queue is also called as FIRST IN FIRST OUT [FIFO] system. It is a linear list in which deletion can take place only at one end of the list i.e. “FRONT” of the list In queue Insertion can take place only at other end of the list. i.e. “REAR” Figure : Array Representation Of Queue AAA BBB CCC …………DDD 1 32 4 5 N Front=1 Rear = 4
  • 14. Non-Linear Data Structure 1. TREE : It is a non linear is mainly used to represent data containing a hierarchical relationship between elements. 2. GRAPH : Data sometimes contains relationship between pair of elements which is not hierarchical in nature is called a graph . A B C D D D D D