SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsJulie Iskander
 
Queue data structure
Queue data structureQueue data structure
Queue data structureanooppjoseph
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structureMAHALAKSHMI P
 
Array data structure
Array data structureArray data structure
Array data structuremaamir farooq
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - GraphMadhu Bala
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structureVardhil Patel
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm03446940736
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IMohamed Loey
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisationMuzamil Hussain
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structureAbrish06
 
Arrays in python
Arrays in pythonArrays in python
Arrays in pythonmoazamali28
 
Binary Search Tree in Data Structure
Binary Search Tree in Data StructureBinary Search Tree in Data Structure
Binary Search Tree in Data StructureDharita Chokshi
 

La actualidad más candente (20)

Linked list
Linked listLinked list
Linked list
 
Complexity of Algorithm
Complexity of AlgorithmComplexity of Algorithm
Complexity of Algorithm
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
 
Tree and graph
Tree and graphTree and graph
Tree and graph
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structure
 
Array data structure
Array data structureArray data structure
Array data structure
 
Linked list
Linked listLinked list
Linked list
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structure
 
Sorting
SortingSorting
Sorting
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms I
 
Elementary data organisation
Elementary data organisationElementary data organisation
Elementary data organisation
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
 
Arrays in python
Arrays in pythonArrays in python
Arrays in python
 
Binary Search Tree in Data Structure
Binary Search Tree in Data StructureBinary Search Tree in Data Structure
Binary Search Tree in Data Structure
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Más de 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
 

Más de 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
 

Último

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 

Último (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

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