SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Lecture - 1
      on
Data Structures
Data Type and Data Structure

Data type
     •Set of possible values for variables
     •Operations on those values
Ex : int, float, char ……….

Data Structure
A data structure is an arrangement of data in a computer's memory
or even disk storage.
The logical and mathematical model of a particular organization of
data is called a data structure.
A data structure is a particular way of storing and organizing data
in a computer so that it can be used efficiently.
An example of several common data structures:
     • arrays,
     •linked lists,
     •stacks,
     •queues,
     • trees,
     •and Graph
Array
Linear array (One dimensional array) : A list of finite number n of similar data
elements referenced respectively by a set of n consecutive numbers, usually 1,
2, 3,…..n. That is a specific element is accessed by an index.
Let, Array name is A then the elements of A is : a1,a2….. an
Or by the bracket notation A[1], A[2], A[3],…………., A[n]
The number k in A[k] is called a subscript and A[k] is called a subscripted
variable.




                                                               element
Example
A linear array STUDENT consisting of the name of six students

                            STUDENT
                   1    Dalia Rahaman
                   2    Sumona
                   3    Mubtasim Fuad
                   4
                        Anamul Haque
                   5
                        Ibtisam Rahaman
                   6
                        Jarin



                Here, STUDENT[4] denote Anamul Haque
Array (con…)
Linear arrays are called one dimensional arrays because each
element in such an array is referenced by one subscript.
 (Two dimensional array) : Two dimensional array is a collection of
similar data elements where each element is referenced by two
subscripts.
Such arrays are called matrices in mathematics and tables in
business applications.
Multidimensional arrays are defined analogously
              MATRICES
          1       2   3     4
  1   1       2       3    4
                                       Here, MATRICES[3,3]=11
  2   5       6       7    8
  3   9       10      11   12
  4   13      14      15   16
Array Data Structure
It can hold multiple values of a single type.
Elements are referenced by the array name and an ordinal index.
Each element is a value
Indexing begins at zero.
The array forms a contiguous list in memory.
The name of the array holds the address of the first array element.
We specify the array size at compile time, often with a named constant.
Linked lists
  •A linked list, or one way list, is a linear collection of data
  elements, called nodes, where the linear order is given by means
  of pointers.

  •Dynamically allocate space for each element as needed.


                     Node

                  Data      Next

In linked list
     Each node of the list contains the data item
         a pointer to the next node

Collection structure has a pointer to the list Start
    Initially NULL
                      Start

                    Prepared by, Jesmin Akhter,
                          Lecturer, IIT,JU
Linked lists

Start


            node
                                             node
               Data       Next                Data


                  Linked list with 2 nodes




        Prepared by, Jesmin Akhter,
              Lecturer, IIT,JU
Linked lists
            INFO   LINK

START   1                  START=3, INFO[3]=M

 3      2   A      5       LINK[3]=2, INFO[2]=A

        3   M      2       LINK[2]=5, INFO[5]=N
                           LINK[5]=4, INFO[4]=G
        4   G      7
                           LINK[4]=7, INFO[7]=O
        5   N      4
                           LINK[7]=0, NULL value, So the list has ended
        6
        7   O      0

        8
Stacks
• Stacks are a special form of collection
  with LIFO semantics
• Two methods
     - add item to the top of the stack
     - remove an item from the top of the stack
• Like a plate stacker
Queues

• Like a stack, a queue is also a list. However,
  with a queue, insertion is done at one end, while
  deletion is performed at the other end
• The insertion end is called rear
   – The deletion end is called front



  Remove                                   Insert
            front                   rear
edges
Data structure operations
The data appearing in our data structure is processed by means of certain
operations. In fact, the particular data structure that one chooses for a given
situation depends largely on the frequency with which specific operations are
performed. The following four operations play a major role:

Traversing
Accessing each record exactly once so that certain items in the record may
be processed. (This accessing or processing is sometimes called 'visiting"
the records.)

Searching
Finding the location of the record with a given key value, or finding the
locations of all records, which satisfy one or more conditions.

Inserting
Adding new records to the structure.

Deleting
Removing a record from the structure.
Data structure operations (Continued)

The following two operations, which are used in special situations, will also be
considered:
Sorting:
Arranging the records in some logical order
Merging:
Combining the records in two different sorted files into a single sorted files
Algorithms
An essential aspect to data structures is algorithms. Data structures
are implemented using algorithms.
An Algorithm is a finite step – by – step list of well defined instructions
for solving a particular problem. It is used to manipulate the data
contained in the data structures as in searching and sorting. It states
explicitly how the data will be manipulated.

            Perform data structure operations
Complexity


The complexity of an algorithm is a function describing the efficiency of the
algorithm in terms of the amount of data the algorithm must process. There
are two main complexity measures of the efficiency of an algorithm:

Time complexity is a function describing the amount of time an algorithm
takes in terms of the amount of input to the algorithm.

Space complexity is a function describing the amount of memory (space) an
algorithm takes in terms of the amount of input to the algorithm.
Discussion
•Once data is organized into forms such as trees, stacks and queues,
standard algorithms can be used to process them.

•Properly organized data lead to easy-to understand user interfaces

Weitere ähnliche Inhalte

Was ist angesagt?

Array data structure
Array data structureArray data structure
Array data structuremaamir farooq
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its typesRameesha Sadaqat
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure NUPOORAWSARMOL
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationArun Sharma
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2Self-Employed
 
Data Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptxData Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptxEllenGrace9
 
Data Structures- Part7 linked lists
Data Structures- Part7 linked listsData Structures- Part7 linked lists
Data Structures- Part7 linked listsAbdullah Al-hazmy
 
Algorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching AlgorithmsAlgorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching AlgorithmsMohamed Loey
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST Kathirvel Ayyaswamy
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptxSyed Zaid Irshad
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure shameen khan
 

Was ist angesagt? (20)

Array data structure
Array data structureArray data structure
Array data structure
 
C++ Arrays
C++ ArraysC++ Arrays
C++ Arrays
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its types
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2
 
Data Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptxData Structures and Algorithm - Module 1.pptx
Data Structures and Algorithm - Module 1.pptx
 
Data structures using c
Data structures using cData structures using c
Data structures using c
 
Data Structures- Part7 linked lists
Data Structures- Part7 linked listsData Structures- Part7 linked lists
Data Structures- Part7 linked lists
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
Algorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching AlgorithmsAlgorithms Lecture 6: Searching Algorithms
Algorithms Lecture 6: Searching Algorithms
 
Hashing
HashingHashing
Hashing
 
Relational model
Relational modelRelational model
Relational model
 
UNIT I LINEAR DATA STRUCTURES – LIST
UNIT I 	LINEAR DATA STRUCTURES – LIST 	UNIT I 	LINEAR DATA STRUCTURES – LIST
UNIT I LINEAR DATA STRUCTURES – LIST
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 

Andere mochten auch

Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Muhammad Hammad Waseem
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2Kumar
 
linked list
linked listlinked list
linked listAbbott
 
Introduction to data structure by anil dutt
Introduction to data structure by anil duttIntroduction to data structure by anil dutt
Introduction to data structure by anil duttAnil Dutt
 
5 Array List, data structure course
5 Array List, data structure course5 Array List, data structure course
5 Array List, data structure courseMahmoud Alfarra
 
Data Structure (Introduction to Data Structure)
Data Structure (Introduction to Data Structure)Data Structure (Introduction to Data Structure)
Data Structure (Introduction to Data Structure)Adam Mukharil Bachtiar
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureRai University
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Hassan Ahmed
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introductionSugandh Wafai
 
data structure and algorithms
data structure and algorithmsdata structure and algorithms
data structure and algorithmsibrar ahmad
 
‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism‫‫Chapter4 Polymorphism
‫‫Chapter4 PolymorphismMahmoud Alfarra
 

Andere mochten auch (20)

Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2
 
01 05 - introduction xml
01  05 - introduction xml01  05 - introduction xml
01 05 - introduction xml
 
linked list
linked listlinked list
linked list
 
L6 structure
L6 structureL6 structure
L6 structure
 
Introduction to data structure by anil dutt
Introduction to data structure by anil duttIntroduction to data structure by anil dutt
Introduction to data structure by anil dutt
 
‫Chapter3 inheritance
‫Chapter3 inheritance‫Chapter3 inheritance
‫Chapter3 inheritance
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
5 Array List, data structure course
5 Array List, data structure course5 Array List, data structure course
5 Array List, data structure course
 
3 Array operations
3   Array operations3   Array operations
3 Array operations
 
Data Structure (Introduction to Data Structure)
Data Structure (Introduction to Data Structure)Data Structure (Introduction to Data Structure)
Data Structure (Introduction to Data Structure)
 
Data structures
Data structuresData structures
Data structures
 
Mca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structureMca ii dfs u-1 introduction to data structure
Mca ii dfs u-1 introduction to data structure
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
 
Graphs data Structure
Graphs data StructureGraphs data Structure
Graphs data Structure
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
 
Basic data-structures-v.1.1
Basic data-structures-v.1.1Basic data-structures-v.1.1
Basic data-structures-v.1.1
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introduction
 
data structure and algorithms
data structure and algorithmsdata structure and algorithms
data structure and algorithms
 
‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism
 

Ähnlich wie Data structure lecture 1

Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyDatastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyMalikireddy Bramhananda Reddy
 
Ds it203-11-l01
Ds it203-11-l01Ds it203-11-l01
Ds it203-11-l01Chyon Ju
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structuresSenthil Murugan
 
8074.pdf
8074.pdf8074.pdf
8074.pdfBAna36
 
DATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGESTDATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGESTSwapnil Mishra
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdfSulabhPawaia
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptxssuser031f35
 
1 list datastructures
1 list datastructures1 list datastructures
1 list datastructuresNguync91368
 
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHIBCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHISowmya Jyothi
 
DATA STRUCTURE BY SIVASANKARI
DATA STRUCTURE BY SIVASANKARIDATA STRUCTURE BY SIVASANKARI
DATA STRUCTURE BY SIVASANKARISivaSankari36
 

Ähnlich wie Data structure lecture 1 (20)

Datastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada ReddyDatastructures and algorithms prepared by M.V.Brehmanada Reddy
Datastructures and algorithms prepared by M.V.Brehmanada Reddy
 
Ds it203-11-l01
Ds it203-11-l01Ds it203-11-l01
Ds it203-11-l01
 
M v bramhananda reddy dsa complete notes
M v bramhananda reddy dsa complete notesM v bramhananda reddy dsa complete notes
M v bramhananda reddy dsa complete notes
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
 
cluod.pdf
cluod.pdfcluod.pdf
cluod.pdf
 
unit 2.pptx
unit 2.pptxunit 2.pptx
unit 2.pptx
 
8074.pdf
8074.pdf8074.pdf
8074.pdf
 
DATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGESTDATA STRUCTURES USING C -ENGGDIGEST
DATA STRUCTURES USING C -ENGGDIGEST
 
lect 2-DS ALGO(online).pdf
lect 2-DS  ALGO(online).pdflect 2-DS  ALGO(online).pdf
lect 2-DS ALGO(online).pdf
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf2. Introduction to Data Structure.pdf
2. Introduction to Data Structure.pdf
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
1 list datastructures
1 list datastructures1 list datastructures
1 list datastructures
 
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHIBCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
 
numpy.pdf
numpy.pdfnumpy.pdf
numpy.pdf
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 1.pptx
 
DATA STRUCTURE BY SIVASANKARI
DATA STRUCTURE BY SIVASANKARIDATA STRUCTURE BY SIVASANKARI
DATA STRUCTURE BY SIVASANKARI
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
 

Mehr von Kumar

Graphics devices
Graphics devicesGraphics devices
Graphics devicesKumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithmsKumar
 
region-filling
region-fillingregion-filling
region-fillingKumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivationKumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons dericationKumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xsltKumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xmlKumar
 
Xml basics
Xml basicsXml basics
Xml basicsKumar
 
XML Schema
XML SchemaXML Schema
XML SchemaKumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xmlKumar
 
Applying xml
Applying xmlApplying xml
Applying xmlKumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLKumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee applicationKumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLKumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB FundmentalsKumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programmingKumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programmingKumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversKumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EEKumar
 

Mehr von Kumar (20)

Graphics devices
Graphics devicesGraphics devices
Graphics devices
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
region-filling
region-fillingregion-filling
region-filling
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Xml basics
Xml basicsXml basics
Xml basics
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
 
DTD
DTDDTD
DTD
 
Applying xml
Applying xmlApplying xml
Applying xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
 

Kürzlich hochgeladen

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Data structure lecture 1

  • 1. Lecture - 1 on Data Structures
  • 2. Data Type and Data Structure Data type •Set of possible values for variables •Operations on those values Ex : int, float, char ………. Data Structure A data structure is an arrangement of data in a computer's memory or even disk storage. The logical and mathematical model of a particular organization of data is called a data structure. A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
  • 3. An example of several common data structures: • arrays, •linked lists, •stacks, •queues, • trees, •and Graph
  • 4.
  • 5. Array Linear array (One dimensional array) : A list of finite number n of similar data elements referenced respectively by a set of n consecutive numbers, usually 1, 2, 3,…..n. That is a specific element is accessed by an index. Let, Array name is A then the elements of A is : a1,a2….. an Or by the bracket notation A[1], A[2], A[3],…………., A[n] The number k in A[k] is called a subscript and A[k] is called a subscripted variable. element
  • 6. Example A linear array STUDENT consisting of the name of six students STUDENT 1 Dalia Rahaman 2 Sumona 3 Mubtasim Fuad 4 Anamul Haque 5 Ibtisam Rahaman 6 Jarin Here, STUDENT[4] denote Anamul Haque
  • 7. Array (con…) Linear arrays are called one dimensional arrays because each element in such an array is referenced by one subscript. (Two dimensional array) : Two dimensional array is a collection of similar data elements where each element is referenced by two subscripts. Such arrays are called matrices in mathematics and tables in business applications. Multidimensional arrays are defined analogously MATRICES 1 2 3 4 1 1 2 3 4 Here, MATRICES[3,3]=11 2 5 6 7 8 3 9 10 11 12 4 13 14 15 16
  • 8. Array Data Structure It can hold multiple values of a single type. Elements are referenced by the array name and an ordinal index. Each element is a value Indexing begins at zero. The array forms a contiguous list in memory. The name of the array holds the address of the first array element. We specify the array size at compile time, often with a named constant.
  • 9. Linked lists •A linked list, or one way list, is a linear collection of data elements, called nodes, where the linear order is given by means of pointers. •Dynamically allocate space for each element as needed. Node Data Next In linked list Each node of the list contains the data item a pointer to the next node Collection structure has a pointer to the list Start Initially NULL Start Prepared by, Jesmin Akhter, Lecturer, IIT,JU
  • 10. Linked lists Start node node Data Next Data Linked list with 2 nodes Prepared by, Jesmin Akhter, Lecturer, IIT,JU
  • 11. Linked lists INFO LINK START 1 START=3, INFO[3]=M 3 2 A 5 LINK[3]=2, INFO[2]=A 3 M 2 LINK[2]=5, INFO[5]=N LINK[5]=4, INFO[4]=G 4 G 7 LINK[4]=7, INFO[7]=O 5 N 4 LINK[7]=0, NULL value, So the list has ended 6 7 O 0 8
  • 12. Stacks • Stacks are a special form of collection with LIFO semantics • Two methods - add item to the top of the stack - remove an item from the top of the stack • Like a plate stacker
  • 13. Queues • Like a stack, a queue is also a list. However, with a queue, insertion is done at one end, while deletion is performed at the other end • The insertion end is called rear – The deletion end is called front Remove Insert front rear
  • 14. edges
  • 15.
  • 16.
  • 17. Data structure operations The data appearing in our data structure is processed by means of certain operations. In fact, the particular data structure that one chooses for a given situation depends largely on the frequency with which specific operations are performed. The following four operations play a major role: Traversing Accessing each record exactly once so that certain items in the record may be processed. (This accessing or processing is sometimes called 'visiting" the records.) Searching Finding the location of the record with a given key value, or finding the locations of all records, which satisfy one or more conditions. Inserting Adding new records to the structure. Deleting Removing a record from the structure.
  • 18. Data structure operations (Continued) The following two operations, which are used in special situations, will also be considered: Sorting: Arranging the records in some logical order Merging: Combining the records in two different sorted files into a single sorted files
  • 19. Algorithms An essential aspect to data structures is algorithms. Data structures are implemented using algorithms. An Algorithm is a finite step – by – step list of well defined instructions for solving a particular problem. It is used to manipulate the data contained in the data structures as in searching and sorting. It states explicitly how the data will be manipulated. Perform data structure operations
  • 20. Complexity The complexity of an algorithm is a function describing the efficiency of the algorithm in terms of the amount of data the algorithm must process. There are two main complexity measures of the efficiency of an algorithm: Time complexity is a function describing the amount of time an algorithm takes in terms of the amount of input to the algorithm. Space complexity is a function describing the amount of memory (space) an algorithm takes in terms of the amount of input to the algorithm.
  • 21. Discussion •Once data is organized into forms such as trees, stacks and queues, standard algorithms can be used to process them. •Properly organized data lead to easy-to understand user interfaces