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

PPTX
Data structure and its types.
PPTX
Presentation on Data Structure
PDF
Datastructureitstypes
PPTX
Introduction to data structure
PPTX
Data structure & its types
PPT
data structure
PPT
Lecture 1 data structures and algorithms
PPTX
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure and its types.
Presentation on Data Structure
Datastructureitstypes
Introduction to data structure
Data structure & its types
data structure
Lecture 1 data structures and algorithms
Data structure,abstraction,abstract data type,static and dynamic,time and spa...

What's hot (20)

PPT
Introductiont To Aray,Tree,Stack, Queue
PPTX
Introduction to data structure
PPTX
General Data structures
PDF
Data structure
PDF
Introduction of data structures and algorithms
PPTX
Computer Science-Data Structures :Abstract DataType (ADT)
PPT
Data structures and Alogarithims
PPT
Data struters
PPT
Data structure
PPT
Elementary data organisation
PPSX
Data Structure # vpmp polytechnic
PPTX
Data structures Lecture no. 2
PPT
Abstract data types (adt) intro to data structure part 2
PPTX
Data structures Lecture no.3
PPTX
Data structures lectures no 1
PPT
Abstract data types
PPTX
Introduction to data structure ppt
PDF
PPTX
Introduction to stack
PPT
Data structures
Introductiont To Aray,Tree,Stack, Queue
Introduction to data structure
General Data structures
Data structure
Introduction of data structures and algorithms
Computer Science-Data Structures :Abstract DataType (ADT)
Data structures and Alogarithims
Data struters
Data structure
Elementary data organisation
Data Structure # vpmp polytechnic
Data structures Lecture no. 2
Abstract data types (adt) intro to data structure part 2
Data structures Lecture no.3
Data structures lectures no 1
Abstract data types
Introduction to data structure ppt
Introduction to stack
Data structures
Ad

Viewers also liked (20)

PDF
FYI - Gems' Art Show 2015
PDF
PPTX
Χριστούγεννα, η γιορτή της ενανθρώπησης του θεού
PPTX
Materi CSS lanjut
PDF
Taxa de Juros Real 2013
PPTX
Sneha Hasthaalu
PDF
説明一転! 松代大本営説明版の内容修正
PPT
SAS Curriculum Density #11- Day 3
PPTX
Reach.UrFaculty - Govt. Jobs Update Mar 8
PPTX
Reach.UrFaculty - Govt. Jobs Update Mar 7
PDF
A General Extension System for Event Processing Languages
PPTX
The best wordpress backlink plugin get 150
PPTX
Zoyo Branding Local Search with Google Places
PPT
Mobile Apps And Your Business
PPT
Gerbang Logika
PDF
Scegli me slide_santarelli_9pag
PDF
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
PPT
Kotak Warna Game by Fakhri
PPT
World 1, Module 2
FYI - Gems' Art Show 2015
Χριστούγεννα, η γιορτή της ενανθρώπησης του θεού
Materi CSS lanjut
Taxa de Juros Real 2013
Sneha Hasthaalu
説明一転! 松代大本営説明版の内容修正
SAS Curriculum Density #11- Day 3
Reach.UrFaculty - Govt. Jobs Update Mar 8
Reach.UrFaculty - Govt. Jobs Update Mar 7
A General Extension System for Event Processing Languages
The best wordpress backlink plugin get 150
Zoyo Branding Local Search with Google Places
Mobile Apps And Your Business
Gerbang Logika
Scegli me slide_santarelli_9pag
CANASTAS VIVERES 2015 - SUPERMERCADOS LA CASITA
Kotak Warna Game by Fakhri
World 1, Module 2
Ad

Similar to Intro ds (20)

PPTX
DS Module 1.pptx
PPTX
DS Module 1.pptx
PDF
Data structures and algorithms short note (version 14).pd
PPTX
01-Introduction of DSA-1.pptx
PDF
DS UNIT 1.pdf
PDF
DS UNIT 1.pdf
PPT
Data Structures
DOC
data structures and algorithm Cha 1and 2.doc
PPTX
Lecture_1_Introduction to Data Structures and Algorithm.pptx
PPTX
Introduction to DS.pptx
PPTX
Chapter 1 _edited.pptx.software engineering
PPTX
Chapter 1 _edited.pptx.software engineering
PPT
Data_Structure With C_LECTURE ONE PPT123
PDF
UNIT I - Data Structures.pdf
PPT
Introduction To Data Structures.ppt
PPTX
CHAPTER-1- Introduction to data structure.pptx
PDF
M v bramhananda reddy dsa complete notes
DOC
Data Structure
PPT
Introduction - Data Structures and Algorithms.ppt
PPTX
Lecture 1.pptxffffffffffffffcfffffffffff
DS Module 1.pptx
DS Module 1.pptx
Data structures and algorithms short note (version 14).pd
01-Introduction of DSA-1.pptx
DS UNIT 1.pdf
DS UNIT 1.pdf
Data Structures
data structures and algorithm Cha 1and 2.doc
Lecture_1_Introduction to Data Structures and Algorithm.pptx
Introduction to DS.pptx
Chapter 1 _edited.pptx.software engineering
Chapter 1 _edited.pptx.software engineering
Data_Structure With C_LECTURE ONE PPT123
UNIT I - Data Structures.pdf
Introduction To Data Structures.ppt
CHAPTER-1- Introduction to data structure.pptx
M v bramhananda reddy dsa complete notes
Data Structure
Introduction - Data Structures and Algorithms.ppt
Lecture 1.pptxffffffffffffffcfffffffffff

Recently uploaded (20)

PDF
Classroom Observation Tools for Teachers
PPTX
Institutional Correction lecture only . . .
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
VCE English Exam - Section C Student Revision Booklet
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Complications of Minimal Access Surgery at WLH
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pharma ospi slides which help in ospi learning
PPH.pptx obstetrics and gynecology in nursing
102 student loan defaulters named and shamed – Is someone you know on the list?
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O7-L3 Supply Chain Operations - ICLT Program

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