SlideShare a Scribd company logo
DATA STRUCTURE
Vaibhav P Mujmule
DATA STRUCTURE
B.SC. II (SEM – III)
Vaibhav P Mujmule
Syllabus
Unit 1
❖Data Structure: introduction to data structure, types of data
structure: primitive and non primitive, linear and non linear DS, Data
structure operations.
❖Linear Arrays: Definition and concepts, representation, operations
on arrays: traversing, inserting, operations.
❖Stacks: Definition and concepts, representations, operations on
stack: Push and Pop.
Introduction to Data Structure
➢Computer is an electronic machine which is used for data processing and
manipulation.
➢When programmer collects such type of data for processing, he would require
to store all of them in computers main memory.
➢In order to make how computer work we need to know
Representation of data in computer.
Accessing of data.
How to solve problem step by step.
➢For doing all of this task we used Data Structure
What is Data
Structure
➢ A data structure is a
specialized format for
organizing, processing,
retrieving and storing
data.
➢ In computer
programming, a data
structure may be selected
or designed to store data
for the purpose of working
on it with various
algorithms.
➢Data Structure can be defined as the group of data elementswhich providesan
efficient way of storing and organizing data in the computer so that it can be used
efficiently.
➢examples of Data Structures are arrays, Linked List, Stack, Queue, etc.
➢Data Structures are widelyused in almost every aspect of Computer Science i.e.
Operating System, CompilerDesign, Artificial intelligence,Graphics and many more.
➢Data Structures are the main part of many computer science algorithmsas they
enable the programmers to handle the data in an efficient way.
➢It plays a vitalrole in enhancing the performance of a software or a program as the
main function of the software is to store and retrieve the user’s data as fast as
possible
What is Data Structure
Data Structure
◦ A data structure is a particular way of organizing data in a computer so that it can be used effectively.
◦ For example, we can store a list of items having the same data-type using the array data structure.
➢The representation of particular data structure in the main memory of a computer is calledas
storage structure.
➢The storage structure representation in auxiliary memory is calledas file structure.
➢It is define as the way of storing and manipulating data in organized form so that it can be used
efficiently
➢Data Structure mainly specifies the following four things:
1)organization of data 2)accessing method 3)degree of associativity 4) processing alternative
for information
➢Algorithm + Data Structure = Program
➢Data Structure study Covers the following points
1) Amount of memory require to store
2) Amount of time require to process
3) Representation of data in memory
4) Operations performs on data
Types Of DS
The DS are dividedinto
two types:
1) Primitive
2) Non primitive
Non primitivedividedinto
two type
1) Linear DS
2) Non linear DS
DATA TYPES
A particular kind of data item, as defined by the values it can take, the
Programminglanguage used, or the operations that can be performed on it.
◦ Primitive Data Structure
◦ PrimitiveData Structure are basic structure and directly operated upon by machine instructions.
◦ Primitivedata structures have different representations on different computers.
◦ Integers, floats, character and pointers are example of primitivedata structures.
◦ These data types are available in most programming languages as built in type.
Integer: It is a data type which allows all values without fraction part. We can used it for whole
numbers.
Float: It is a data type which is use for storing fraction numbers.
Character: It is a data type which is used for character values.
Pointer: A variablethat hold memory address of another variable are calledpointer.
Non Primitive Data Type
◦ These are more sophisticated data structures.
◦ These are derivedfrom primitivedata structure.
◦ The non – primitive data structures emphasize structuring of a group of homogeneous or
heterogeneous data items.
◦ Example of non – primitivedata types are Array, List, and File etc.
◦ A non – primitivedata type is further dividedinto Linear and non – Linear data structure.
Array: An array is a fixedsize sequenced collection of elements of the same data type.
List: An ordered set containing variablenumber of elements is called as List.
File: A file is a collection of logically related information. It can be viewedas a large list of
records consisting of various fields.
Linear Data Structures
▪ A linear data structure simplymeans that it is a storage format of
the data in the memory in which the data are arranged in
contiguous blocks of memory.
▪ Example is the array of characters it represented by one
character after another.
▪ In the linear data structure, member elements form a sequence
in the storage.
▪ There are two ways to represent a linear data structure in
memory.
static memory allocation
dynamic memory allocation
The possibleoperations on the linear data structure are:
1) Traversing 2) Insertion 3) Deletion 4) searching 5) sorting
6) merging
◦ Example of Linear data structure are Stack and
Queue
Stack
◦ Stack is a data structure in which insertion and
deletion operations are performed at one end
only.
◦ The insertion operation is referred to as ‘PUSH’ and
deletion is referred as ‘POP’ operation
◦ Stack is also called as Last In First Out (LIFO) data
structure.
Queue
◦ The data structure which permits the insertionat
one and deletion at another end, known as
Queue.
◦ End at which deletion is occurs is known as FRONT
end and another end at which insertion occurs is
known as REAR end.
◦ Queue is also calledas First In First Out (FIFO)
◦ Non linear DS are those data structure in which data items are not
arranged in a sequence.
◦ Example on Non Linear DS are Tree and Graph.
TREE
◦ A Tree can be define as finite data items (nodes) in which data
items are arranged in branches and sub branches
◦ Tree represent the hierarchical relationship between various
elements
◦ Tree consist of nodes connected by edge, the represented by
circle and edge lives connecting to circle.
Graph
◦ Graph is collection of nodes (information) and connecting edges
(Logical relation) between nodes.
◦ A tree can be viewed as restricted graph
◦ Graph have many types: 1) Simple graph 2) Mixed graph 3) Multi
graph 4) Directed graph 5) Un-directed graph
Non-Linear Data Structure
Components of Graph
Difference Between Linear and Non Linear Data Structure
Linear Data Structure
◦ Every item is related to its previous and
next item.
◦ Data is arranged in linear sequence.
◦ Data items can be traversed in a single run
◦ E.g. Array, Stacks, Linked list, Queue
◦ Implementation is easy.
Non – Linear Data Structure
◦ Every item is attached with many other
items.
◦ Data is not arranged in sequence.
◦ Data cannot be traversed in a single run.
◦ E.g. Tree, Graph
◦ Implementation is difficult.
Operation on Data Structures
Design of efficient data structure must take operations to be performed on the DS into account.
The most commonly used operations on DS are broadly categorized into following types
1. Create: This operation results in reserving memory for program elements. This can be done by
declaration statement Creation of DS may take place either during compile-time or run-time.
2. Destroy: This operation destroy memory space allocatedfor specifieddata structure .
3. Selection: This operation deals with accessing a particular data within a data structure.
4. Updation: It updates or modifies the data in the data structure.
5. Searching: It finds the presence of desired data item in the list of data items, it may also find
locations of all elements that satisfy certain conditions.
6. Sorting: This is a process of arranging all data items in a DS in particular order, for example either
ascending order or in descending order.
7. Splitting: It is a process of partitioning singlelist to multiple list.
8. Merging: It is a process of combining data items of two different sorted list into single sorted list.
9. Traversing: It is a process of visiting each and every node of a list in systematicmanner.
What are Arrays?
Array is a container which can
hold a fix number of items and
these items should be of the
same type.
Most of the data structures make
use of arrays to implement their
algorithms.
•Following are the important
terms to understand the concept
of Array.
Element − Each item stored
in an array is called an element.
Index − Each location of an
element in an array has a
numerical index, which is used to
identify the element.
1. An array is a container of elements.
2. Elements have a specific value and data type, like "ABC", TRUE or FALSE, etc.
3. Each element also has its own index, which is used to access the element.
• Elements arestored at
contiguous memory
locations.
• An index is alwaysless than
the total number of array
items.
• In terms of syntax, any
variablethat is declared as an
arraycan store multiple
values.
• Almost all languageshave the
samecomprehension of
arraysbut havedifferent
waysof declaringand
initializingthem.
• However, three parts will
alwaysremaincommon in all
the initializations,i.e., array
name, elements, and the data
type of elements.
•Arrayname: necessary for easy reference to the collection of elements
•Data Type: necessary for type checking and data integrity
•Elements: these are the data values present in an array
How to access a
specific array
value?
You can access any array item by
using its index
Syntax
arrayName[indexNum]
Example
balance[1]
Here, we have accessed the second value of the array using its index, which is 1.
The output of this will be 200, which is basically the second value of the balance
array.
◦ Array Representation
◦ Arrays can be declared in various ways in different languages. For illustration, let's take C array declaration.
Thank You

More Related Content

PPTX
DataStructurePpt.pptx
PPTX
ntroduction of Algorithms, Analysing Algorithms. Arrays: Sparse Matrices - Re...
PPTX
DataStructureccvdgddfffdesddsssdssPpt.pptx
PPTX
Unit-1 DataStructure Intro.pptx
PPTX
DataStructurePpt-01.pptxEngineering data structure notes
PPTX
DataStructurePpt.pptx
PPTX
Introduction to data structures (ss)
PDF
Unit.1 Introduction to Data Structuresres
DataStructurePpt.pptx
ntroduction of Algorithms, Analysing Algorithms. Arrays: Sparse Matrices - Re...
DataStructureccvdgddfffdesddsssdssPpt.pptx
Unit-1 DataStructure Intro.pptx
DataStructurePpt-01.pptxEngineering data structure notes
DataStructurePpt.pptx
Introduction to data structures (ss)
Unit.1 Introduction to Data Structuresres

Similar to Data Structure Ppt for our engineering college industrial training. (20)

PPTX
Introduction to Data Structure
PPTX
Dsa unit 1
PPTX
DATA-STRUCTURES.pptx
PPTX
Different types of sorting used in programming.pptx
PPT
The Stack in Data structure and algorithm
PPTX
Introduction to Data Structures and their importance
PPTX
DSA - Copy.pptx
PPTX
Lecture 2 Data Structure Introduction
PDF
3130703dsgtudarshan Enotesallunits Darshan Institute Of Engineering Technology
PPTX
Data structure (basics)
PDF
Data Structures & Recursion-Introduction.pdf
PPT
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
PDF
Unit 1-Introduction to Data Structures-BCA.pdf
PDF
Data Structure Introduction.pdfssssssssssss
PPTX
DATA STRUCTURE AND COMPUTER ALGORITHMS LECTURE 1
PDF
Datastructures Notes
PPT
Chapter 1 - Introduction to Data Structure.ppt
PPTX
DS Module 1.pptx
Introduction to Data Structure
Dsa unit 1
DATA-STRUCTURES.pptx
Different types of sorting used in programming.pptx
The Stack in Data structure and algorithm
Introduction to Data Structures and their importance
DSA - Copy.pptx
Lecture 2 Data Structure Introduction
3130703dsgtudarshan Enotesallunits Darshan Institute Of Engineering Technology
Data structure (basics)
Data Structures & Recursion-Introduction.pdf
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
Unit 1-Introduction to Data Structures-BCA.pdf
Data Structure Introduction.pdfssssssssssss
DATA STRUCTURE AND COMPUTER ALGORITHMS LECTURE 1
Datastructures Notes
Chapter 1 - Introduction to Data Structure.ppt
DS Module 1.pptx
Ad

Recently uploaded (20)

PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
PPT on Performance Review to get promotions
PPTX
Lecture Notes Electrical Wiring System Components
PPT
Project quality management in manufacturing
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
web development for engineering and engineering
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Well-logging-methods_new................
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPT on Performance Review to get promotions
Lecture Notes Electrical Wiring System Components
Project quality management in manufacturing
Embodied AI: Ushering in the Next Era of Intelligent Systems
Model Code of Practice - Construction Work - 21102022 .pdf
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
web development for engineering and engineering
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Well-logging-methods_new................
UNIT 4 Total Quality Management .pptx
CYBER-CRIMES AND SECURITY A guide to understanding
Lesson 3_Tessellation.pptx finite Mathematics
Strings in CPP - Strings in C++ are sequences of characters used to store and...
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Operating System & Kernel Study Guide-1 - converted.pdf
Ad

Data Structure Ppt for our engineering college industrial training.

  • 2. DATA STRUCTURE B.SC. II (SEM – III) Vaibhav P Mujmule
  • 3. Syllabus Unit 1 ❖Data Structure: introduction to data structure, types of data structure: primitive and non primitive, linear and non linear DS, Data structure operations. ❖Linear Arrays: Definition and concepts, representation, operations on arrays: traversing, inserting, operations. ❖Stacks: Definition and concepts, representations, operations on stack: Push and Pop.
  • 4. Introduction to Data Structure ➢Computer is an electronic machine which is used for data processing and manipulation. ➢When programmer collects such type of data for processing, he would require to store all of them in computers main memory. ➢In order to make how computer work we need to know Representation of data in computer. Accessing of data. How to solve problem step by step. ➢For doing all of this task we used Data Structure
  • 5. What is Data Structure ➢ A data structure is a specialized format for organizing, processing, retrieving and storing data. ➢ In computer programming, a data structure may be selected or designed to store data for the purpose of working on it with various algorithms.
  • 6. ➢Data Structure can be defined as the group of data elementswhich providesan efficient way of storing and organizing data in the computer so that it can be used efficiently. ➢examples of Data Structures are arrays, Linked List, Stack, Queue, etc. ➢Data Structures are widelyused in almost every aspect of Computer Science i.e. Operating System, CompilerDesign, Artificial intelligence,Graphics and many more. ➢Data Structures are the main part of many computer science algorithmsas they enable the programmers to handle the data in an efficient way. ➢It plays a vitalrole in enhancing the performance of a software or a program as the main function of the software is to store and retrieve the user’s data as fast as possible What is Data Structure
  • 7. Data Structure ◦ A data structure is a particular way of organizing data in a computer so that it can be used effectively. ◦ For example, we can store a list of items having the same data-type using the array data structure.
  • 8. ➢The representation of particular data structure in the main memory of a computer is calledas storage structure. ➢The storage structure representation in auxiliary memory is calledas file structure. ➢It is define as the way of storing and manipulating data in organized form so that it can be used efficiently ➢Data Structure mainly specifies the following four things: 1)organization of data 2)accessing method 3)degree of associativity 4) processing alternative for information ➢Algorithm + Data Structure = Program ➢Data Structure study Covers the following points 1) Amount of memory require to store 2) Amount of time require to process 3) Representation of data in memory 4) Operations performs on data
  • 9. Types Of DS The DS are dividedinto two types: 1) Primitive 2) Non primitive Non primitivedividedinto two type 1) Linear DS 2) Non linear DS
  • 10. DATA TYPES A particular kind of data item, as defined by the values it can take, the Programminglanguage used, or the operations that can be performed on it. ◦ Primitive Data Structure ◦ PrimitiveData Structure are basic structure and directly operated upon by machine instructions. ◦ Primitivedata structures have different representations on different computers. ◦ Integers, floats, character and pointers are example of primitivedata structures. ◦ These data types are available in most programming languages as built in type. Integer: It is a data type which allows all values without fraction part. We can used it for whole numbers. Float: It is a data type which is use for storing fraction numbers. Character: It is a data type which is used for character values. Pointer: A variablethat hold memory address of another variable are calledpointer.
  • 11. Non Primitive Data Type ◦ These are more sophisticated data structures. ◦ These are derivedfrom primitivedata structure. ◦ The non – primitive data structures emphasize structuring of a group of homogeneous or heterogeneous data items. ◦ Example of non – primitivedata types are Array, List, and File etc. ◦ A non – primitivedata type is further dividedinto Linear and non – Linear data structure. Array: An array is a fixedsize sequenced collection of elements of the same data type. List: An ordered set containing variablenumber of elements is called as List. File: A file is a collection of logically related information. It can be viewedas a large list of records consisting of various fields.
  • 12. Linear Data Structures ▪ A linear data structure simplymeans that it is a storage format of the data in the memory in which the data are arranged in contiguous blocks of memory. ▪ Example is the array of characters it represented by one character after another. ▪ In the linear data structure, member elements form a sequence in the storage. ▪ There are two ways to represent a linear data structure in memory. static memory allocation dynamic memory allocation The possibleoperations on the linear data structure are: 1) Traversing 2) Insertion 3) Deletion 4) searching 5) sorting 6) merging
  • 13. ◦ Example of Linear data structure are Stack and Queue Stack ◦ Stack is a data structure in which insertion and deletion operations are performed at one end only. ◦ The insertion operation is referred to as ‘PUSH’ and deletion is referred as ‘POP’ operation ◦ Stack is also called as Last In First Out (LIFO) data structure. Queue ◦ The data structure which permits the insertionat one and deletion at another end, known as Queue. ◦ End at which deletion is occurs is known as FRONT end and another end at which insertion occurs is known as REAR end. ◦ Queue is also calledas First In First Out (FIFO)
  • 14. ◦ Non linear DS are those data structure in which data items are not arranged in a sequence. ◦ Example on Non Linear DS are Tree and Graph. TREE ◦ A Tree can be define as finite data items (nodes) in which data items are arranged in branches and sub branches ◦ Tree represent the hierarchical relationship between various elements ◦ Tree consist of nodes connected by edge, the represented by circle and edge lives connecting to circle. Graph ◦ Graph is collection of nodes (information) and connecting edges (Logical relation) between nodes. ◦ A tree can be viewed as restricted graph ◦ Graph have many types: 1) Simple graph 2) Mixed graph 3) Multi graph 4) Directed graph 5) Un-directed graph Non-Linear Data Structure Components of Graph
  • 15. Difference Between Linear and Non Linear Data Structure Linear Data Structure ◦ Every item is related to its previous and next item. ◦ Data is arranged in linear sequence. ◦ Data items can be traversed in a single run ◦ E.g. Array, Stacks, Linked list, Queue ◦ Implementation is easy. Non – Linear Data Structure ◦ Every item is attached with many other items. ◦ Data is not arranged in sequence. ◦ Data cannot be traversed in a single run. ◦ E.g. Tree, Graph ◦ Implementation is difficult.
  • 16. Operation on Data Structures Design of efficient data structure must take operations to be performed on the DS into account. The most commonly used operations on DS are broadly categorized into following types 1. Create: This operation results in reserving memory for program elements. This can be done by declaration statement Creation of DS may take place either during compile-time or run-time. 2. Destroy: This operation destroy memory space allocatedfor specifieddata structure . 3. Selection: This operation deals with accessing a particular data within a data structure. 4. Updation: It updates or modifies the data in the data structure. 5. Searching: It finds the presence of desired data item in the list of data items, it may also find locations of all elements that satisfy certain conditions. 6. Sorting: This is a process of arranging all data items in a DS in particular order, for example either ascending order or in descending order. 7. Splitting: It is a process of partitioning singlelist to multiple list. 8. Merging: It is a process of combining data items of two different sorted list into single sorted list. 9. Traversing: It is a process of visiting each and every node of a list in systematicmanner.
  • 17. What are Arrays? Array is a container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. •Following are the important terms to understand the concept of Array. Element − Each item stored in an array is called an element. Index − Each location of an element in an array has a numerical index, which is used to identify the element. 1. An array is a container of elements. 2. Elements have a specific value and data type, like "ABC", TRUE or FALSE, etc. 3. Each element also has its own index, which is used to access the element.
  • 18. • Elements arestored at contiguous memory locations. • An index is alwaysless than the total number of array items. • In terms of syntax, any variablethat is declared as an arraycan store multiple values. • Almost all languageshave the samecomprehension of arraysbut havedifferent waysof declaringand initializingthem. • However, three parts will alwaysremaincommon in all the initializations,i.e., array name, elements, and the data type of elements. •Arrayname: necessary for easy reference to the collection of elements •Data Type: necessary for type checking and data integrity •Elements: these are the data values present in an array
  • 19. How to access a specific array value? You can access any array item by using its index Syntax arrayName[indexNum] Example balance[1] Here, we have accessed the second value of the array using its index, which is 1. The output of this will be 200, which is basically the second value of the balance array.
  • 20. ◦ Array Representation ◦ Arrays can be declared in various ways in different languages. For illustration, let's take C array declaration.