SlideShare a Scribd company logo
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
Define : A Procedure or method or recipe  or formula or set of steps that can be used by a computer for the solution of a problem It is a specific set of rules to obtain a definite output from specific inputs provide to the problem WHAT IS ALGORITHM ?
WHAT IS DATA STRUCTURE? 1. A  Data structure  is a particular way of storing and organizing data in a computer. So that it can be used efficiently. 2.  Data structures  deals with the study of methods, techniques and tools to organize or structure data
Different kinds of data structures are suited to different kinds of applications, and some are  highly specialized  to specific tasks.  For example,  B-trees  are particularly well-suited for implementation of  databases , while  compiler  implementations usually use  hash tables  to look up identifiers.
Data structures are used in almost every program or software system. Data structures provide a means to manage huge amounts of data efficiently, such as large databases and internet indexing services.  Usually, efficient data structures are a key to designing efficient algorithms
ABSTRACT DATA TYPES [ADT] WHAT IS DATA TYPES? A data type refers to the type of values that variables in a programming language hold. WHAT IS ADT? Abstract data type refers to the data objects  (refers to the list of elements such as list of integers or list of alphabetical strings)  which comprise the data structure, and their fundamental operations.
An ADT promotes data abstraction and focuses on  what a data structure does  rather than how it does
CLASSIFICATION OF DATA STRUCTURES DATA STRUCTURES Non-Linear Linked Sequential Linear Arrays Stacks Queues Priority queues Linked Lists Linked Stacks Linked Queues Trees Graphs
Linear data structures are unidimensional in structure and represent linear lists. Non-linear data structures are two-dimensional representation of data lists
ARRAYS
WHAT IS ARRAY? An array is an ADT whose objects are  sequence of elements of the same types  and  the two operations performed on it are store and retrieve. STORE(list, i, e) RETRIEVE(list , i  )
TYPES OF ARRAY One-dimensional  A[1:5] Two dimensional B[1:3][1:4] Multi dimensional C[1:3][1:6][1:8]….
STACK
A  stack  is a last in, first out (LIFO) abstract data type and data structure.  A stack can have any abstract data type as an element It is characterized by only  three fundamental operations:  push ,  pop  and  stack top .  The  push operation  adds a new item to the top of the stack, or initializes the stack if it is empty.
If the stack is full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state.  The  pop operation  removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack,  But if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed).
The  stack top operation  gets the data from the top-most position and returns it to the user without deleting it. The same underflow state can also occur in stack top operation if stack is empty.
A stack is a  restricted data structure , because only a small number of operations are performed on it . The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition: therefore, the lower elements are those that have been on the stack the longest.
Implementation of push operation on a stack Procedure PUSH(STACK,n,top,item) if(top=n) then  STACK_FULL; else   { top=top+1; STACK[top]=item;   } end PUSH
Implementation of pop operation on a stack Procedure POP(STACK,top,item) if(top=0) then  STACK_EMPTY; else   { item=STACK[top]; top=top-1;   } end POP
QUESTIONS ?
THANK YOU

More Related Content

What's hot (20)

PPT
Introductiont To Aray,Tree,Stack, Queue
Ghaffar Khan
 
PPTX
Introduction to data structure
Vivek Kumar Sinha
 
PPTX
General Data structures
Youssef Elsalhawy
 
PDF
Data structure
Prof. Dr. K. Adisesha
 
PDF
Introduction of data structures and algorithms
VinayKumarV16
 
PPTX
Computer Science-Data Structures :Abstract DataType (ADT)
St Mary's College,Thrissur,Kerala
 
PPT
Data structures and Alogarithims
Victor Palmar
 
PPT
Data struters
ashish bansal
 
PPT
Data structure
Mohd Arif
 
PPT
Elementary data organisation
Muzamil Hussain
 
PPSX
Data Structure # vpmp polytechnic
lavparmar007
 
PPTX
Data structures Lecture no. 2
AzharIqbal710687
 
PPT
Abstract data types (adt) intro to data structure part 2
Self-Employed
 
PPTX
Data structures Lecture no.3
AzharIqbal710687
 
PPTX
Data structures lectures no 1
AzharIqbal710687
 
PPT
Abstract data types
Poojith Chowdhary
 
PPTX
Introduction to data structure ppt
NalinNishant3
 
PDF
Lecture1 data structure(introduction)
Taibah University, College of Computer Science & Engineering
 
PPTX
Introduction to stack
Kavya Shree
 
PPT
Data structures
Manaswi Sharma
 
Introductiont To Aray,Tree,Stack, Queue
Ghaffar Khan
 
Introduction to data structure
Vivek Kumar Sinha
 
General Data structures
Youssef Elsalhawy
 
Data structure
Prof. Dr. K. Adisesha
 
Introduction of data structures and algorithms
VinayKumarV16
 
Computer Science-Data Structures :Abstract DataType (ADT)
St Mary's College,Thrissur,Kerala
 
Data structures and Alogarithims
Victor Palmar
 
Data struters
ashish bansal
 
Data structure
Mohd Arif
 
Elementary data organisation
Muzamil Hussain
 
Data Structure # vpmp polytechnic
lavparmar007
 
Data structures Lecture no. 2
AzharIqbal710687
 
Abstract data types (adt) intro to data structure part 2
Self-Employed
 
Data structures Lecture no.3
AzharIqbal710687
 
Data structures lectures no 1
AzharIqbal710687
 
Abstract data types
Poojith Chowdhary
 
Introduction to data structure ppt
NalinNishant3
 
Introduction to stack
Kavya Shree
 
Data structures
Manaswi Sharma
 

Viewers also liked (20)

PDF
FYI - Gems' Art Show 2015
Melvin Thambi
 
PDF
Insider
joseph_sebastian69
 
PPTX
Χριστούγεννα, η γιορτή της ενανθρώπησης του θεού
ΠΕ 01 ΜΠΑΛΤΟΣ ΙΩΑΝΝΗΣ
 
PPTX
Materi CSS lanjut
Robby Firmansyah
 
PDF
Taxa de Juros Real 2013
FGV-EAESP
 
PPTX
Sneha Hasthaalu
Johny C
 
PDF
説明一転! 松代大本営説明版の内容修正
長野市議会議員小泉一真
 
PPT
SAS Curriculum Density #11- Day 3
jmori1
 
PPTX
Reach.UrFaculty - Govt. Jobs Update Mar 8
Reshmaurfaculty
 
PPTX
Reach.UrFaculty - Govt. Jobs Update Mar 7
Reshmaurfaculty
 
PDF
A General Extension System for Event Processing Languages
Alexandre de Castro Alves
 
PPTX
The best wordpress backlink plugin get 150
trexx101
 
PPTX
Zoyo Branding Local Search with Google Places
Beth Abate Bacon
 
PPT
Mobile Apps And Your Business
front9tech
 
PPT
Gerbang Logika
Robby Firmansyah
 
PDF
Scegli me slide_santarelli_9pag
Tropico del Libro
 
PDF
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
LHA Lou
 
PPT
Kotak Warna Game by Fakhri
fakhriariza
 
PPT
World 1, Module 2
gbgupresentations
 
FYI - Gems' Art Show 2015
Melvin Thambi
 
Χριστούγεννα, η γιορτή της ενανθρώπησης του θεού
ΠΕ 01 ΜΠΑΛΤΟΣ ΙΩΑΝΝΗΣ
 
Materi CSS lanjut
Robby Firmansyah
 
Taxa de Juros Real 2013
FGV-EAESP
 
Sneha Hasthaalu
Johny C
 
説明一転! 松代大本営説明版の内容修正
長野市議会議員小泉一真
 
SAS Curriculum Density #11- Day 3
jmori1
 
Reach.UrFaculty - Govt. Jobs Update Mar 8
Reshmaurfaculty
 
Reach.UrFaculty - Govt. Jobs Update Mar 7
Reshmaurfaculty
 
A General Extension System for Event Processing Languages
Alexandre de Castro Alves
 
The best wordpress backlink plugin get 150
trexx101
 
Zoyo Branding Local Search with Google Places
Beth Abate Bacon
 
Mobile Apps And Your Business
front9tech
 
Gerbang Logika
Robby Firmansyah
 
Scegli me slide_santarelli_9pag
Tropico del Libro
 
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
LHA Lou
 
Kotak Warna Game by Fakhri
fakhriariza
 
World 1, Module 2
gbgupresentations
 
Ad

Similar to Intro ds (20)

PPTX
DS Module 1.pptx
SaralaT3
 
PPTX
DS Module 1.pptx
sarala9
 
PDF
Data structures and algorithms short note (version 14).pd
Nimmi Weeraddana
 
PPTX
01-Introduction of DSA-1.pptx
DwijBaxi
 
PDF
DS UNIT 1.pdf
SeethaDinesh
 
PDF
DS UNIT 1.pdf
SeethaDinesh
 
PPT
Data Structures
Dr.Umadevi V
 
DOC
data structures and algorithm Cha 1and 2.doc
ephremmulu486
 
PPTX
Lecture_1_Introduction to Data Structures and Algorithm.pptx
mueedmughal88
 
PPTX
Introduction to DS.pptx
OnkarModhave
 
PPTX
Chapter 1 _edited.pptx.software engineering
kuruabeje7
 
PPTX
Chapter 1 _edited.pptx.software engineering
kuruabeje7
 
PPT
Data_Structure With C_LECTURE ONE PPT123
deepikadalvi18
 
PDF
UNIT I - Data Structures.pdf
KPRevathiAsstprofITD
 
PPT
Introduction To Data Structures.ppt
NALESVPMEngg
 
PPTX
CHAPTER-1- Introduction to data structure.pptx
OnkarModhave
 
PDF
M v bramhananda reddy dsa complete notes
Malikireddy Bramhananda Reddy
 
DOC
Data Structure
Ibrahim MH
 
PPT
Introduction - Data Structures and Algorithms.ppt
JayaKamal
 
PPTX
Lecture 1.pptxffffffffffffffcfffffffffff
andrewandjames
 
DS Module 1.pptx
SaralaT3
 
DS Module 1.pptx
sarala9
 
Data structures and algorithms short note (version 14).pd
Nimmi Weeraddana
 
01-Introduction of DSA-1.pptx
DwijBaxi
 
DS UNIT 1.pdf
SeethaDinesh
 
DS UNIT 1.pdf
SeethaDinesh
 
Data Structures
Dr.Umadevi V
 
data structures and algorithm Cha 1and 2.doc
ephremmulu486
 
Lecture_1_Introduction to Data Structures and Algorithm.pptx
mueedmughal88
 
Introduction to DS.pptx
OnkarModhave
 
Chapter 1 _edited.pptx.software engineering
kuruabeje7
 
Chapter 1 _edited.pptx.software engineering
kuruabeje7
 
Data_Structure With C_LECTURE ONE PPT123
deepikadalvi18
 
UNIT I - Data Structures.pdf
KPRevathiAsstprofITD
 
Introduction To Data Structures.ppt
NALESVPMEngg
 
CHAPTER-1- Introduction to data structure.pptx
OnkarModhave
 
M v bramhananda reddy dsa complete notes
Malikireddy Bramhananda Reddy
 
Data Structure
Ibrahim MH
 
Introduction - Data Structures and Algorithms.ppt
JayaKamal
 
Lecture 1.pptxffffffffffffffcfffffffffff
andrewandjames
 
Ad

Recently uploaded (20)

PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
community health nursing question paper 2.pdf
Prince kumar
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 

Intro ds

  • 1. INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
  • 2. Define : A Procedure or method or recipe or formula or set of steps that can be used by a computer for the solution of a problem It is a specific set of rules to obtain a definite output from specific inputs provide to the problem WHAT IS ALGORITHM ?
  • 3. WHAT IS DATA STRUCTURE? 1. A Data structure is a particular way of storing and organizing data in a computer. So that it can be used efficiently. 2. Data structures deals with the study of methods, techniques and tools to organize or structure data
  • 4. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-trees are particularly well-suited for implementation of databases , while compiler implementations usually use hash tables to look up identifiers.
  • 5. Data structures are used in almost every program or software system. Data structures provide a means to manage huge amounts of data efficiently, such as large databases and internet indexing services. Usually, efficient data structures are a key to designing efficient algorithms
  • 6. ABSTRACT DATA TYPES [ADT] WHAT IS DATA TYPES? A data type refers to the type of values that variables in a programming language hold. WHAT IS ADT? Abstract data type refers to the data objects (refers to the list of elements such as list of integers or list of alphabetical strings) which comprise the data structure, and their fundamental operations.
  • 7. An ADT promotes data abstraction and focuses on what a data structure does rather than how it does
  • 8. CLASSIFICATION OF DATA STRUCTURES DATA STRUCTURES Non-Linear Linked Sequential Linear Arrays Stacks Queues Priority queues Linked Lists Linked Stacks Linked Queues Trees Graphs
  • 9. Linear data structures are unidimensional in structure and represent linear lists. Non-linear data structures are two-dimensional representation of data lists
  • 11. WHAT IS ARRAY? An array is an ADT whose objects are sequence of elements of the same types and the two operations performed on it are store and retrieve. STORE(list, i, e) RETRIEVE(list , i )
  • 12. TYPES OF ARRAY One-dimensional A[1:5] Two dimensional B[1:3][1:4] Multi dimensional C[1:3][1:6][1:8]….
  • 13. STACK
  • 14. A stack is a last in, first out (LIFO) abstract data type and data structure. A stack can have any abstract data type as an element It is characterized by only three fundamental operations: push , pop and stack top . The push operation adds a new item to the top of the stack, or initializes the stack if it is empty.
  • 15. If the stack is full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state. The pop operation removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack, But if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed).
  • 16. The stack top operation gets the data from the top-most position and returns it to the user without deleting it. The same underflow state can also occur in stack top operation if stack is empty.
  • 17. A stack is a restricted data structure , because only a small number of operations are performed on it . The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition: therefore, the lower elements are those that have been on the stack the longest.
  • 18. Implementation of push operation on a stack Procedure PUSH(STACK,n,top,item) if(top=n) then STACK_FULL; else { top=top+1; STACK[top]=item; } end PUSH
  • 19. Implementation of pop operation on a stack Procedure POP(STACK,top,item) if(top=0) then STACK_EMPTY; else { item=STACK[top]; top=top-1; } end POP