SlideShare a Scribd company logo
1 of 21
ESIT137: Fundamentals of Data Structure
Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423603
(An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Information Technology
(UG Programme - NBAAccredited)
Dr. M.A. Jawale
Professor and Head, Dept. of IT
Fundamentals of Data Structure
 Introduction
 Data Structure,
 Abstract Data Types,
 Types of Data Structure:
a) Primitive and non-primitive,
b) Linear and Non-linear,
c) Static and Dynamic,
d) Persistent and Ephemeral data structures.
 References
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Data Structure
 A data structure is a storage that is used to store and organize data. It is a way of
arranging data on a computer so that it can be accessed and updated efficiently.
 A data structure is not only used for organizing the data. It is also used for
processing, retrieving, and storing data.
 The choice of a good data structure makes it possible to perform a variety of
critical operations effectively. An efficient data structure also uses minimum
memory space and execution time to process the structure.
 Data structures provide an easy way of organising, retrieving, managing, and
storing data..
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Abstract Data Types
 Data types such as int, float, double, long, etc. are considered to be in-built data
types and we can perform basic operations with them such as addition, subtraction,
division, multiplication, etc.
 When we need operations for our user-defined data type which have to be defined.
These operations can be defined only as and when we require them. So, in order to
simplify the process of solving problems, we can create data structures along with
their operations, and such data structures that are not in-built are known as Abstract
Data Type (ADT).
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Continue…..
 Abstract Data type (ADT) is a type (or class) for objects whose behavior is defined
by a set of values and a set of operations. The definition of ADT only mentions
what operations are to be performed but not how these operations will be
implemented. It does not specify how data will be organized in memory and what
algorithms will be used for implementing the operations. It is called “abstract”
because it gives an implementation-independent view.
 The process of providing only the essentials and hiding the details is known as
abstraction.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Continue…..
 The user of data type does not need to know how that data type is implemented, for
example, we have been using Primitive values like int, float, char data types only
with the knowledge that these data type can operate and be performed on without
any idea of how they are implemented.
 So a user only needs to know what a data type can do, but not how it will be
implemented. Think of ADT as a black box which hides the inner structure and
design of the data type.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Classification of Data Structure
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Primitive and Non-primitive Data Structures
 Primitive data structures are the fundamental data types which are supported by
a programming language. Some basic data types are integer, real, character, and
float.
 The terms ‘data type’, ‘basic data type’, and ‘primitive data type’ are often used
interchangeably.
 Non-primitive data structures are those data structures which are created using
primitive data structures.
 Examples of such data structures include linked lists, stacks, trees, and graphs.
 Non-primitive data structures can further be classified into two categories: linear
and non-linear data structures.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Linear Data Structure
 Data structure in which data elements are arranged sequentially or linearly, where
each element is attached to its previous and next adjacent elements, is called a
linear data structure.
 Examples of linear data structures are array, stack, queue, linked list, etc.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Static Data Structure
 Static data structure has a fixed memory size. It is easier to access the elements in
a static data structure.
 An example of this data structure is an array.
 Static data structures, such as arrays, have a fixed size and are allocated at
compile-time. This means that their memory size cannot be changed during
program execution. Index-based access to elements is fast and efficient since the
address of the element is known.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Dynamic Data Structure
 In the dynamic data structure, the size is not fixed. It can be randomly updated
during the runtime which may be considered efficient concerning the memory
(space) complexity of the code.
 Examples of this data structure is linked list.
 Dynamic data structures, on the other hand, have a variable size and are allocated
at run-time. This means that their memory size can be changed during program
execution. Memory can be dynamically allocated or deallocated during program
execution. Due to this dynamic nature, accessing elements based on index may be
slower as it may require memory allocation and deallocation.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Static Data Structure vs Dynamic Data Structure
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Advantage of Static Data Structure :
 Fast access time: Static data structures offer fast access time because memory is
allocated at compile-time and the size is fixed, which makes accessing elements a
simple indexing operation.
 Predictable memory usage: Since the memory allocation is fixed at compile-
time, the programmer can precisely predict how much memory will be used by
the program, which is an important factor in memory-constrained environments.
 Ease of implementation and optimization: Static data structures may be easier
to implement and optimize since the structure and size are fixed, and algorithms
can be optimized for the specific data structure, which reduces cache misses and
can increase the overall performance of the program.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Continue….
 Efficient Memory Management: Static data structures allow for efficient
memory allocation and management. Since the size of the data structure is fixed
at compile-time, memory can be allocated and released efficiently, without the
need for frequent reallocations or memory copies.
 Simplified Code: Since static data structures have a fixed size, they can simplify
code by removing the need for dynamic memory allocation and associated error
checking.
 Reduced overhead: Static data structures typically have lower overhead than
dynamic data structures, since they do not require extra bookkeeping to manage
memory allocation and deallocation.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Advantage Of Dynamic Data Structure
 Flexibility: Dynamic data structures can grow or shrink at runtime as needed,
allowing them to adapt to changing data requirements. This flexibility makes
them well-suited for situations where the size of the data is not known in advance
or is likely to change over time.
 Reduced memory waste: Since dynamic data structures can resize themselves,
they can help reduce memory waste. For example, if a dynamic array needs to
grow, it can allocate additional memory on the heap rather than reserving a large
fixed amount of memory that might not be used.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Continue…..
 Improved performance for some operations: Dynamic data structures can be
more efficient than static data structures for certain operations. For example,
inserting or deleting elements in the middle of a dynamic list can be faster than
with a static array, since the remaining elements can be shifted over more
efficiently.
 Simplified code: Dynamic data structures can simplify code by removing the
need for manual memory management. Dynamic data structures can also reduce
the complexity of code for data structures that need to be resized frequently.
 Scalability: Dynamic data structures can be more scalable than static data
structures, as they can adapt to changing data requirements as the data grows.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Non-linear Data Structure
 Data structures where data elements are not placed sequentially or linearly are
called non-linear data structures. In a non-linear data structure, we can’t traverse
all the elements in a single run only.
 Examples of non-linear data structures are trees and graphs.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Persistent Data Structures.
 A persistent structure is one where, multiple versions are simultaneously
accessible: after an update, both old and new versions can be used.
 A persistent data structure is a data structure that always preserves the previous
version of itself when it is modified.
 They can be considered as ‘immutable’ as updates are not in-place.
 A data structure is partially persistent if all versions can be accessed but only the
newest version can be modified.
 Fully persistent if every version can be both accessed and modified.
Unit-I: Part-I of Data Structure Dr. Madhuri Jawale Department of Information Technology
Ephemeral Data Structures.
 An ephemeral data structure is one for. which only one version is available at a
time: after an update operation, the structure as it existed before the update is lost.
 A persistent structure is one where. multiple versions are simultaneously
accessible: after an update, both old and new versions can be used.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Arrays
 An array is a linear data structure and it is a collection of items stored at
contiguous memory locations.
 The idea is to store multiple items of the same type together in one place. The
first element of the array is indexed by a subscript of 0.
 There are different operations possible in an array, like Searching, Sorting,
Inserting, Traversing, Reversing, and Deleting.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
Reference
1. Richard F. Gilberg & Behrouz A. Forouzan, “Data Structures: A Pseudocode
Approach with C, Second Edition”, Cengage Learning.
2. Ellis Horowitz, Sartaj Sahani, Susan Anderson-Freed “Fundamentals of Data
Structures in C”, Universities Press, 2008.
Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology

More Related Content

What's hot

INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO
INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO
INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO Nathalie Cermeño
 
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Mohammad Karim Shahbaz
 
Project Documentation Student Management System format.pptx
Project Documentation Student Management System format.pptxProject Documentation Student Management System format.pptx
Project Documentation Student Management System format.pptxAjayPatre1
 
Report-An Expert System for Car Failure Diagnosis-Report
Report-An Expert System for Car Failure Diagnosis-ReportReport-An Expert System for Car Failure Diagnosis-Report
Report-An Expert System for Car Failure Diagnosis-ReportViralkumar Jayswal
 
Trabajo de Grado Gerencia de las TIC
Trabajo de Grado  Gerencia de las TICTrabajo de Grado  Gerencia de las TIC
Trabajo de Grado Gerencia de las TICUPTAEB
 
IOT based Automatic Colour Sorting Machine
IOT based Automatic Colour Sorting MachineIOT based Automatic Colour Sorting Machine
IOT based Automatic Colour Sorting Machinevivatechijri
 
Student attendance management system
Student attendance management systemStudent attendance management system
Student attendance management systemVikrant Kumar
 
Student Information & Result Processing Sytem
Student Information & Result Processing SytemStudent Information & Result Processing Sytem
Student Information & Result Processing SytemMuslim U. Sumon
 
Finaldocumentation
FinaldocumentationFinaldocumentation
Finaldocumentationasuadma
 
Apostila de Banco de Dados e SQL.pdf
Apostila de Banco de Dados e SQL.pdfApostila de Banco de Dados e SQL.pdf
Apostila de Banco de Dados e SQL.pdfDiegoTedeschiFranco
 
C++ student management system
C++ student management systemC++ student management system
C++ student management systemABHIJITPATRA23
 

What's hot (13)

INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO
INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO
INFOGRAFIA HACERCA DE LA CIENCIA Y LA TECNOLOGIA EN EL TERRITORIO VENEZOLANO
 
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
 
Data structures project
Data structures projectData structures project
Data structures project
 
Attendance Management System
Attendance Management SystemAttendance Management System
Attendance Management System
 
Project Documentation Student Management System format.pptx
Project Documentation Student Management System format.pptxProject Documentation Student Management System format.pptx
Project Documentation Student Management System format.pptx
 
Report-An Expert System for Car Failure Diagnosis-Report
Report-An Expert System for Car Failure Diagnosis-ReportReport-An Expert System for Car Failure Diagnosis-Report
Report-An Expert System for Car Failure Diagnosis-Report
 
Trabajo de Grado Gerencia de las TIC
Trabajo de Grado  Gerencia de las TICTrabajo de Grado  Gerencia de las TIC
Trabajo de Grado Gerencia de las TIC
 
IOT based Automatic Colour Sorting Machine
IOT based Automatic Colour Sorting MachineIOT based Automatic Colour Sorting Machine
IOT based Automatic Colour Sorting Machine
 
Student attendance management system
Student attendance management systemStudent attendance management system
Student attendance management system
 
Student Information & Result Processing Sytem
Student Information & Result Processing SytemStudent Information & Result Processing Sytem
Student Information & Result Processing Sytem
 
Finaldocumentation
FinaldocumentationFinaldocumentation
Finaldocumentation
 
Apostila de Banco de Dados e SQL.pdf
Apostila de Banco de Dados e SQL.pdfApostila de Banco de Dados e SQL.pdf
Apostila de Banco de Dados e SQL.pdf
 
C++ student management system
C++ student management systemC++ student management system
C++ student management system
 

Similar to Fundamentals of Data Structure_Unit I.pptx

IRJET- Intelligence Extraction using Various Machine Learning Algorithms
IRJET- Intelligence Extraction using Various Machine Learning AlgorithmsIRJET- Intelligence Extraction using Various Machine Learning Algorithms
IRJET- Intelligence Extraction using Various Machine Learning AlgorithmsIRJET Journal
 
data structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptxdata structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptxVicky Singh
 
IRJET- Comparative Study of Efficacy of Big Data Analysis and Deep Learni...
IRJET-  	  Comparative Study of Efficacy of Big Data Analysis and Deep Learni...IRJET-  	  Comparative Study of Efficacy of Big Data Analysis and Deep Learni...
IRJET- Comparative Study of Efficacy of Big Data Analysis and Deep Learni...IRJET Journal
 
Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxArifKamal36
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2RajSingh734307
 
Types OF Data Structures
Types OF Data Structures Types OF Data Structures
Types OF Data Structures Tech Sanhita
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresresamplopsurat
 
Decoding the Role of a Data Engineer.pdf
Decoding the Role of a Data Engineer.pdfDecoding the Role of a Data Engineer.pdf
Decoding the Role of a Data Engineer.pdfDatavalley.ai
 
introduction to Data Structure and classification
 introduction to Data Structure and classification introduction to Data Structure and classification
introduction to Data Structure and classificationchauhankapil
 
Programming Assignment Help
Programming Assignment HelpProgramming Assignment Help
Programming Assignment Help#essaywriting
 
Concept of Database Management System.pptx
Concept of Database Management System.pptxConcept of Database Management System.pptx
Concept of Database Management System.pptxUjjwala Sachin Patil
 
Chapter 2 - Intro to Data Sciences[2].pptx
Chapter 2 - Intro to Data Sciences[2].pptxChapter 2 - Intro to Data Sciences[2].pptx
Chapter 2 - Intro to Data Sciences[2].pptxJethroDignadice2
 
Anwar kamal .pdf.pptx
Anwar kamal .pdf.pptxAnwar kamal .pdf.pptx
Anwar kamal .pdf.pptxLuminous8
 
ICT-DBA-level4
ICT-DBA-level4ICT-DBA-level4
ICT-DBA-level4Infotech27
 

Similar to Fundamentals of Data Structure_Unit I.pptx (20)

IRJET- Intelligence Extraction using Various Machine Learning Algorithms
IRJET- Intelligence Extraction using Various Machine Learning AlgorithmsIRJET- Intelligence Extraction using Various Machine Learning Algorithms
IRJET- Intelligence Extraction using Various Machine Learning Algorithms
 
Data structure
Data structureData structure
Data structure
 
data structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptxdata structure is a storage that is used to store and organize data .pptx
data structure is a storage that is used to store and organize data .pptx
 
IRJET- Comparative Study of Efficacy of Big Data Analysis and Deep Learni...
IRJET-  	  Comparative Study of Efficacy of Big Data Analysis and Deep Learni...IRJET-  	  Comparative Study of Efficacy of Big Data Analysis and Deep Learni...
IRJET- Comparative Study of Efficacy of Big Data Analysis and Deep Learni...
 
Lecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptxLecture 1. Data Structure & Algorithm.pptx
Lecture 1. Data Structure & Algorithm.pptx
 
Datastructures Notes
Datastructures NotesDatastructures Notes
Datastructures Notes
 
Fundamental data structure
Fundamental data structureFundamental data structure
Fundamental data structure
 
Iare ds lecture_notes_2
Iare ds lecture_notes_2Iare ds lecture_notes_2
Iare ds lecture_notes_2
 
Types OF Data Structures
Types OF Data Structures Types OF Data Structures
Types OF Data Structures
 
Unit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data StructuresresUnit.1 Introduction to Data Structuresres
Unit.1 Introduction to Data Structuresres
 
Decoding the Role of a Data Engineer.pdf
Decoding the Role of a Data Engineer.pdfDecoding the Role of a Data Engineer.pdf
Decoding the Role of a Data Engineer.pdf
 
introduction to Data Structure and classification
 introduction to Data Structure and classification introduction to Data Structure and classification
introduction to Data Structure and classification
 
Programming Assignment Help
Programming Assignment HelpProgramming Assignment Help
Programming Assignment Help
 
Chapter 2.pdf
Chapter 2.pdfChapter 2.pdf
Chapter 2.pdf
 
Concept of Database Management System.pptx
Concept of Database Management System.pptxConcept of Database Management System.pptx
Concept of Database Management System.pptx
 
UNIT II.docx
UNIT II.docxUNIT II.docx
UNIT II.docx
 
Chapter 2 - Intro to Data Sciences[2].pptx
Chapter 2 - Intro to Data Sciences[2].pptxChapter 2 - Intro to Data Sciences[2].pptx
Chapter 2 - Intro to Data Sciences[2].pptx
 
UNIT I - Data Structures.pdf
UNIT I - Data Structures.pdfUNIT I - Data Structures.pdf
UNIT I - Data Structures.pdf
 
Anwar kamal .pdf.pptx
Anwar kamal .pdf.pptxAnwar kamal .pdf.pptx
Anwar kamal .pdf.pptx
 
ICT-DBA-level4
ICT-DBA-level4ICT-DBA-level4
ICT-DBA-level4
 

Recently uploaded

Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
STATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subjectSTATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subjectGayathriM270621
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 

Recently uploaded (20)

Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
STATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subjectSTATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subject
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 

Fundamentals of Data Structure_Unit I.pptx

  • 1. ESIT137: Fundamentals of Data Structure Sanjivani Rural Education Society’s Sanjivani College of Engineering, Kopargaon-423603 (An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune) NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Information Technology (UG Programme - NBAAccredited) Dr. M.A. Jawale Professor and Head, Dept. of IT
  • 2. Fundamentals of Data Structure  Introduction  Data Structure,  Abstract Data Types,  Types of Data Structure: a) Primitive and non-primitive, b) Linear and Non-linear, c) Static and Dynamic, d) Persistent and Ephemeral data structures.  References Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 3. Data Structure  A data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently.  A data structure is not only used for organizing the data. It is also used for processing, retrieving, and storing data.  The choice of a good data structure makes it possible to perform a variety of critical operations effectively. An efficient data structure also uses minimum memory space and execution time to process the structure.  Data structures provide an easy way of organising, retrieving, managing, and storing data.. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 4. Abstract Data Types  Data types such as int, float, double, long, etc. are considered to be in-built data types and we can perform basic operations with them such as addition, subtraction, division, multiplication, etc.  When we need operations for our user-defined data type which have to be defined. These operations can be defined only as and when we require them. So, in order to simplify the process of solving problems, we can create data structures along with their operations, and such data structures that are not in-built are known as Abstract Data Type (ADT). Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 5. Continue…..  Abstract Data type (ADT) is a type (or class) for objects whose behavior is defined by a set of values and a set of operations. The definition of ADT only mentions what operations are to be performed but not how these operations will be implemented. It does not specify how data will be organized in memory and what algorithms will be used for implementing the operations. It is called “abstract” because it gives an implementation-independent view.  The process of providing only the essentials and hiding the details is known as abstraction. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 6. Continue…..  The user of data type does not need to know how that data type is implemented, for example, we have been using Primitive values like int, float, char data types only with the knowledge that these data type can operate and be performed on without any idea of how they are implemented.  So a user only needs to know what a data type can do, but not how it will be implemented. Think of ADT as a black box which hides the inner structure and design of the data type. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 7. Classification of Data Structure Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 8. Primitive and Non-primitive Data Structures  Primitive data structures are the fundamental data types which are supported by a programming language. Some basic data types are integer, real, character, and float.  The terms ‘data type’, ‘basic data type’, and ‘primitive data type’ are often used interchangeably.  Non-primitive data structures are those data structures which are created using primitive data structures.  Examples of such data structures include linked lists, stacks, trees, and graphs.  Non-primitive data structures can further be classified into two categories: linear and non-linear data structures. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 9. Linear Data Structure  Data structure in which data elements are arranged sequentially or linearly, where each element is attached to its previous and next adjacent elements, is called a linear data structure.  Examples of linear data structures are array, stack, queue, linked list, etc. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 10. Static Data Structure  Static data structure has a fixed memory size. It is easier to access the elements in a static data structure.  An example of this data structure is an array.  Static data structures, such as arrays, have a fixed size and are allocated at compile-time. This means that their memory size cannot be changed during program execution. Index-based access to elements is fast and efficient since the address of the element is known. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 11. Dynamic Data Structure  In the dynamic data structure, the size is not fixed. It can be randomly updated during the runtime which may be considered efficient concerning the memory (space) complexity of the code.  Examples of this data structure is linked list.  Dynamic data structures, on the other hand, have a variable size and are allocated at run-time. This means that their memory size can be changed during program execution. Memory can be dynamically allocated or deallocated during program execution. Due to this dynamic nature, accessing elements based on index may be slower as it may require memory allocation and deallocation. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 12. Static Data Structure vs Dynamic Data Structure Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 13. Advantage of Static Data Structure :  Fast access time: Static data structures offer fast access time because memory is allocated at compile-time and the size is fixed, which makes accessing elements a simple indexing operation.  Predictable memory usage: Since the memory allocation is fixed at compile- time, the programmer can precisely predict how much memory will be used by the program, which is an important factor in memory-constrained environments.  Ease of implementation and optimization: Static data structures may be easier to implement and optimize since the structure and size are fixed, and algorithms can be optimized for the specific data structure, which reduces cache misses and can increase the overall performance of the program. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 14. Continue….  Efficient Memory Management: Static data structures allow for efficient memory allocation and management. Since the size of the data structure is fixed at compile-time, memory can be allocated and released efficiently, without the need for frequent reallocations or memory copies.  Simplified Code: Since static data structures have a fixed size, they can simplify code by removing the need for dynamic memory allocation and associated error checking.  Reduced overhead: Static data structures typically have lower overhead than dynamic data structures, since they do not require extra bookkeeping to manage memory allocation and deallocation. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 15. Advantage Of Dynamic Data Structure  Flexibility: Dynamic data structures can grow or shrink at runtime as needed, allowing them to adapt to changing data requirements. This flexibility makes them well-suited for situations where the size of the data is not known in advance or is likely to change over time.  Reduced memory waste: Since dynamic data structures can resize themselves, they can help reduce memory waste. For example, if a dynamic array needs to grow, it can allocate additional memory on the heap rather than reserving a large fixed amount of memory that might not be used. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 16. Continue…..  Improved performance for some operations: Dynamic data structures can be more efficient than static data structures for certain operations. For example, inserting or deleting elements in the middle of a dynamic list can be faster than with a static array, since the remaining elements can be shifted over more efficiently.  Simplified code: Dynamic data structures can simplify code by removing the need for manual memory management. Dynamic data structures can also reduce the complexity of code for data structures that need to be resized frequently.  Scalability: Dynamic data structures can be more scalable than static data structures, as they can adapt to changing data requirements as the data grows. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 17. Non-linear Data Structure  Data structures where data elements are not placed sequentially or linearly are called non-linear data structures. In a non-linear data structure, we can’t traverse all the elements in a single run only.  Examples of non-linear data structures are trees and graphs. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 18. Persistent Data Structures.  A persistent structure is one where, multiple versions are simultaneously accessible: after an update, both old and new versions can be used.  A persistent data structure is a data structure that always preserves the previous version of itself when it is modified.  They can be considered as ‘immutable’ as updates are not in-place.  A data structure is partially persistent if all versions can be accessed but only the newest version can be modified.  Fully persistent if every version can be both accessed and modified. Unit-I: Part-I of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 19. Ephemeral Data Structures.  An ephemeral data structure is one for. which only one version is available at a time: after an update operation, the structure as it existed before the update is lost.  A persistent structure is one where. multiple versions are simultaneously accessible: after an update, both old and new versions can be used. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 20. Arrays  An array is a linear data structure and it is a collection of items stored at contiguous memory locations.  The idea is to store multiple items of the same type together in one place. The first element of the array is indexed by a subscript of 0.  There are different operations possible in an array, like Searching, Sorting, Inserting, Traversing, Reversing, and Deleting. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology
  • 21. Reference 1. Richard F. Gilberg & Behrouz A. Forouzan, “Data Structures: A Pseudocode Approach with C, Second Edition”, Cengage Learning. 2. Ellis Horowitz, Sartaj Sahani, Susan Anderson-Freed “Fundamentals of Data Structures in C”, Universities Press, 2008. Unit-I: Part-I Fundamentals of Data Structure Dr. Madhuri Jawale Department of Information Technology