SlideShare ist ein Scribd-Unternehmen logo
1 von 49
Downloaden Sie, um offline zu lesen
Data Structures and Algorithms




     Sequential
     Search

   @ There are instances when you do not know the
        element number, but you do know the value of the
        element. In this case a search must be made on
        the array to find the correct element. The easiest
        way to search an array is called a sequential search.




Data Structures                                            *Property of STI
                                                              Page 1 of 49
Data Structures and Algorithms




     Binary Search




Data Structures                     *Property of STI
                                       Page 2 of 49
Data Structures and Algorithms




     Binary Search


Example of a Binary Search
                       A

                  1   5

                  2   7
                           Order of comparisons to find the element
                           number of 44:
                  3   9

                  4   12    1. Element 7 (UB = 13, LB = 1, Element
                  5   15
                               Number = 7)
                            2. Element 10 (UB = 13, LB = 8, Element
                  6
                               Number 10)
                      20

                  7   25    3. Element 12 (UB = 13, LB = 11,
                  8   28       Element Number = 12)
                  9   33
                           Number 44 is found in three comparisons,
              10      35   compared to 12 with the sequential
              11      40   search.
              12      44

              13      47




Data Structures                                                   *Property of STI
                                                                     Page 3 of 49
Data Structures and Algorithms




         Pointer
         Technique




Data Structures                     *Property of STI
                                       Page 4 of 49
Data Structures and Algorithms




         Pointer
         Technique




Data Structures                     *Property of STI
                                       Page 5 of 49
Data Structures and Algorithms




         Pointer
         Technique




Data Structures                     *Property of STI
                                       Page 6 of 49
Data Structures and Algorithms




         Pointer
         Technique




                  The element number of the frequency
                  distribution array is the number of points
                  correct and the value of the element is
                  the number of students that received that
                  grade. Therefore, the frequency
                  distribution array F shows that there is 1
                  student who received 1 point, 1 that
                  received 2 points, 2 that received 3 points,
                  1 that received 4 points, 1 that received
                  5 points, 3 that received 6 points, 4 that
                  received 7 points, 5 that received 8 points,
                  6 that received 9 points and 6 that
                  received 10 points.



Data Structures                                                *Property of STI
                                                                  Page 7 of 49
Data Structures and Algorithms




     Cross-Tabulation




Data Structures                   *Property of STI
                                     Page 8 of 49
Data Structures and Algorithms




     Cross-Tabulation




Data Structures                   *Property of STI
                                     Page 9 of 49
Data Structures and Algorithms




     Cross-Tabulation




Data Structures                   *Property of STI
                                    Page 10 of 49
Data Structures and Algorithms




     Cross-Tabulation




Data Structures                   *Property of STI
                                    Page 11 of 49
Data Structures and Algorithms




     Cross-Tabulation




Data Structures                   *Property of STI
                                    Page 12 of 49
Data Structures and Algorithms




    Cross-Tabulation




Data Structures                  *Property of STI
                                   Page 13 of 49
Data Structures and Algorithms




    Cross-Tabulation




Data Structures                  *Property of STI
                                   Page 14 of 49
Data Structures and Algorithms




        Sorting
        Techniques

Selection Exchange Sort Technique
@ Sorting – is the process of putting data in
      alphabetical or numeric order using one key field
      or a concatenation of two or more fields. Data are
      sorted according to the primary key.

     Once the data are in order, they can be accessed by
     various means, including the sequential search and
     the binary search.




Data Structures                                         *Property of STI
                                                          Page 15 of 49
Data Structures and Algorithms




        Sorting
        Techniques

The Selection Exchange Sort




Data Structures                              *Property of STI
                                               Page 16 of 49
Data Structures and Algorithms




        Sorting
        Techniques

Flowchart and Algorithm for SWAP Module




Data Structures                                *Property of STI
                                                 Page 17 of 49
Data Structures and Algorithms




        Sorting
        Techniques


     Example Pass, I = 1




Data Structures                           *Property of STI
                                            Page 18 of 49
Data Structures and Algorithms




        Sorting
        Techniques

Bubble Sort




Data Structures                     *Property of STI
                                      Page 19 of 49
Data Structures and Algorithms




        Sorting
        Techniques

Flowchart and Algorithm for Bubble Sort




Data Structures                                  *Property of STI
                                                   Page 20 of 49
Data Structures and Algorithms




        Sorting
        Techniques

Shell Sort




Data Structures                     *Property of STI
                                      Page 21 of 49
Data Structures and Algorithms




        Sorting
        Techniques

Algorithm and Flowchart for the Shell Sort




Data Structures                                   *Property of STI
                                                    Page 22 of 49
Data Structures and Algorithms




        Stacks

  @ A Stack is a list of numbers, such as an array of
        numbers, to which all additions are at one end
        and all deletions are at the same end. This is a
        last-in, first-out procedure.

        When a value (X) is added to the stack it is called
        pushing the stack.

        When a value (X) is used from the stack it is called
        popping the stack.

        PUSH 3
        PUSH 4
        PUSH 7
        POP X
        POP X
        PUSH 6




Data Structures                                            *Property of STI
                                                             Page 23 of 49
Data Structures and Algorithms




        Stacks


Example of a Stack That Has Been Pushed and
Popped




Data Structures                                  *Property of STI
                                                   Page 24 of 49
Data Structures and Algorithms




        Stacks

Algorithm and Flowchart to Push and Pop a Stack




Data Structures                                 *Property of STI
                                                  Page 25 of 49
Data Structures and Algorithms




      Linked List

@ A Linked List is a file in which each record points to
      its successor, except for the last record, which has
      an end-of-list indicator.

@ The method of pointing to the next record is a field,
      which contains the record number of the next record
      in order. This is called the linking field, since the
      value in this field links the records in proper order.

Example of an Initially Created Linked List




Data Structures                                           *Property of STI
                                                            Page 26 of 49
Data Structures and Algorithms




      Linked List

Example of A Linked List After Multiple Adds and
Deletions




Data Structures                                  *Property of STI
                                                   Page 27 of 49
Data Structures and Algorithms




      Linked List


Original File




                  Comment: Notice that
                  records 5 and 9 are records
                  that have been deleted in
                  the past and are included in
                  the empty list, even though
                  there are data in the record.
                  The used list skips these
                  records .



Data Structures                             *Property of STI
                                              Page 28 of 49
Data Structures and Algorithms




      Linked List


File After The Additions and Deletions




Data Structures                                    *Property of STI
                                                     Page 29 of 49
Data Structures and Algorithms




      Linked List

     Add 69




Data Structures                    *Property of STI
                                     Page 30 of 49
Data Structures and Algorithms




      Linked List


     Delete 17




Data Structures                    *Property of STI
                                     Page 31 of 49
Data Structures and Algorithms




      Linked List

     Delete 44




Data Structures                    *Property of STI
                                     Page 32 of 49
Data Structures and Algorithms




      Linked List

     Add 37




Data Structures                    *Property of STI
                                     Page 33 of 49
Data Structures and Algorithms




      Linked List


     Delete 29




Data Structures                    *Property of STI
                                     Page 34 of 49
Data Structures and Algorithms




      Linked List


     Add 40




Data Structures                    *Property of STI
                                     Page 35 of 49
Data Structures and Algorithms




      Linked List


     Add 90




Data Structures                    *Property of STI
                                     Page 36 of 49
Data Structures and Algorithms




      Linked List


     Add 1




Data Structures                    *Property of STI
                                     Page 37 of 49
Data Structures and Algorithms




      Linked List


     Add 16




Data Structures                    *Property of STI
                                     Page 38 of 49
Data Structures and Algorithms




      Linked List

Algorithm and Flowchart to Create a Linked List




Data Structures                                   *Property of STI
                                                    Page 39 of 49
Data Structures and Algorithms




      Linked List

Algorithm and Flowchart for Processing and
Updating a Linked List




Data Structures                                  *Property of STI
                                                   Page 40 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 41 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 42 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 43 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 44 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 45 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 46 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 47 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 48 of 49
Data Structures and Algorithms




      Linked List




Data Structures                    *Property of STI
                                     Page 49 of 49

Weitere ähnliche Inhalte

Was ist angesagt?

Report
ReportReport
Reportbutest
 
Knowledge representation and reasoning
Knowledge representation and reasoningKnowledge representation and reasoning
Knowledge representation and reasoningMaryam Maleki
 
Linking Behavioral Patterns to Personal Attributes through Data Re-Mining
Linking Behavioral Patterns to Personal Attributes through Data Re-MiningLinking Behavioral Patterns to Personal Attributes through Data Re-Mining
Linking Behavioral Patterns to Personal Attributes through Data Re-Miningertekg
 
Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelDr. Abdul Ahad Abro
 
Anandkumar novel approach
Anandkumar novel approachAnandkumar novel approach
Anandkumar novel approachJasline Presilda
 
XPath XSLT Workshop - Concept Listing
XPath XSLT Workshop - Concept ListingXPath XSLT Workshop - Concept Listing
XPath XSLT Workshop - Concept ListingIndrajeet Verma
 
ppt slides
ppt slidesppt slides
ppt slidesbutest
 
Analysis of computational
Analysis of computationalAnalysis of computational
Analysis of computationalcsandit
 
Application of the Fuzzy Knowledge Base in the Construction of Expert Systems
Application of the Fuzzy Knowledge Base in the Construction of Expert Systems Application of the Fuzzy Knowledge Base in the Construction of Expert Systems
Application of the Fuzzy Knowledge Base in the Construction of Expert Systems ITIIIndustries
 
MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...
MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...
MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...Aravind NC
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 018threspecter
 
Basic Foundations of Automata Theory
Basic Foundations of Automata TheoryBasic Foundations of Automata Theory
Basic Foundations of Automata Theorysaugat86
 
Circuit design presentation
Circuit design presentationCircuit design presentation
Circuit design presentationDebopriyo Roy
 

Was ist angesagt? (20)

Report
ReportReport
Report
 
4th sem
4th sem4th sem
4th sem
 
Knowledge representation and reasoning
Knowledge representation and reasoningKnowledge representation and reasoning
Knowledge representation and reasoning
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Cs8391 notes rejinpaul
Cs8391 notes rejinpaulCs8391 notes rejinpaul
Cs8391 notes rejinpaul
 
C7 agramakirshnan2
C7 agramakirshnan2C7 agramakirshnan2
C7 agramakirshnan2
 
Linking Behavioral Patterns to Personal Attributes through Data Re-Mining
Linking Behavioral Patterns to Personal Attributes through Data Re-MiningLinking Behavioral Patterns to Personal Attributes through Data Re-Mining
Linking Behavioral Patterns to Personal Attributes through Data Re-Mining
 
NCRAST Talk on Clustering
NCRAST Talk on ClusteringNCRAST Talk on Clustering
NCRAST Talk on Clustering
 
Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms Excel
 
Anandkumar novel approach
Anandkumar novel approachAnandkumar novel approach
Anandkumar novel approach
 
XPath XSLT Workshop - Concept Listing
XPath XSLT Workshop - Concept ListingXPath XSLT Workshop - Concept Listing
XPath XSLT Workshop - Concept Listing
 
ppt slides
ppt slidesppt slides
ppt slides
 
Analysis of computational
Analysis of computationalAnalysis of computational
Analysis of computational
 
D2 anandkumar
D2 anandkumarD2 anandkumar
D2 anandkumar
 
Application of the Fuzzy Knowledge Base in the Construction of Expert Systems
Application of the Fuzzy Knowledge Base in the Construction of Expert Systems Application of the Fuzzy Knowledge Base in the Construction of Expert Systems
Application of the Fuzzy Knowledge Base in the Construction of Expert Systems
 
MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...
MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...
MC0083 – Object Oriented Analysis &. Design using UML - Master of Computer Sc...
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 01
 
Basic Foundations of Automata Theory
Basic Foundations of Automata TheoryBasic Foundations of Automata Theory
Basic Foundations of Automata Theory
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
 
Circuit design presentation
Circuit design presentationCircuit design presentation
Circuit design presentation
 

Andere mochten auch

Algorithm Complexity and Main Concepts
Algorithm Complexity and Main ConceptsAlgorithm Complexity and Main Concepts
Algorithm Complexity and Main ConceptsAdelina Ahadova
 
MDLC 2012 Workshop
MDLC 2012 WorkshopMDLC 2012 Workshop
MDLC 2012 WorkshopDavid Prindle
 
Flow chart and pseudo code
Flow chart and pseudo code Flow chart and pseudo code
Flow chart and pseudo code Niva tharan
 
6 problem solving with decisions
6 problem solving with decisions6 problem solving with decisions
6 problem solving with decisionsRheigh Henley Calderon
 
How to create an excellent presentation
How to create an excellent presentationHow to create an excellent presentation
How to create an excellent presentationRuth Weal
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its typesNavtar Sidhu Brar
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examplesGautam Roy
 

Andere mochten auch (8)

Algorithm Complexity and Main Concepts
Algorithm Complexity and Main ConceptsAlgorithm Complexity and Main Concepts
Algorithm Complexity and Main Concepts
 
MDLC 2012 Workshop
MDLC 2012 WorkshopMDLC 2012 Workshop
MDLC 2012 Workshop
 
3 pc upgrade
3 pc upgrade3 pc upgrade
3 pc upgrade
 
Flow chart and pseudo code
Flow chart and pseudo code Flow chart and pseudo code
Flow chart and pseudo code
 
6 problem solving with decisions
6 problem solving with decisions6 problem solving with decisions
6 problem solving with decisions
 
How to create an excellent presentation
How to create an excellent presentationHow to create an excellent presentation
How to create an excellent presentation
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examples
 

Ă„hnlich wie 10 data structures

Data Structures - Linear Lists_PPT for Class 12
Data Structures - Linear Lists_PPT for Class 12Data Structures - Linear Lists_PPT for Class 12
Data Structures - Linear Lists_PPT for Class 12shiv240206
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxsabithabanu83
 
Data Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Data Patterns - A Native Open Source Data Profiling Tool for HPCC SystemsData Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Data Patterns - A Native Open Source Data Profiling Tool for HPCC SystemsHPCC Systems
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
01VD062009003760042.pdf
01VD062009003760042.pdf01VD062009003760042.pdf
01VD062009003760042.pdfSunilMatsagar1
 

Ă„hnlich wie 10 data structures (6)

Data structure using c++
Data structure using c++Data structure using c++
Data structure using c++
 
Data Structures - Linear Lists_PPT for Class 12
Data Structures - Linear Lists_PPT for Class 12Data Structures - Linear Lists_PPT for Class 12
Data Structures - Linear Lists_PPT for Class 12
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
 
Data Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Data Patterns - A Native Open Source Data Profiling Tool for HPCC SystemsData Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Data Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
01VD062009003760042.pdf
01VD062009003760042.pdf01VD062009003760042.pdf
01VD062009003760042.pdf
 

Mehr von Rheigh Henley Calderon (20)

9 processing arrays
9 processing arrays9 processing arrays
9 processing arrays
 
8 problem solving with the case logic structure
8 problem solving with the case logic structure8 problem solving with the case logic structure
8 problem solving with the case logic structure
 
2 beginning problem solving concepts for the computer
2 beginning problem solving concepts for the computer2 beginning problem solving concepts for the computer
2 beginning problem solving concepts for the computer
 
1 introduction to problem solving and programming
1 introduction to problem solving and programming1 introduction to problem solving and programming
1 introduction to problem solving and programming
 
9 technical support
9 technical support9 technical support
9 technical support
 
8 customer service
8 customer service8 customer service
8 customer service
 
7 laptop repair
7 laptop repair7 laptop repair
7 laptop repair
 
6 laptop basics
6 laptop basics6 laptop basics
6 laptop basics
 
5 pc maintenance
5 pc maintenance5 pc maintenance
5 pc maintenance
 
4 pc repair
4 pc repair4 pc repair
4 pc repair
 
2 pc assembly
2 pc assembly2 pc assembly
2 pc assembly
 
1 hardware fundamentals
1 hardware fundamentals1 hardware fundamentals
1 hardware fundamentals
 
8 cyber crimes
8 cyber crimes8 cyber crimes
8 cyber crimes
 
7 computer ethics
7 computer ethics7 computer ethics
7 computer ethics
 
6 professional ethics
6 professional ethics6 professional ethics
6 professional ethics
 
5 business ethics
5 business ethics5 business ethics
5 business ethics
 
4 human relation
4 human relation4 human relation
4 human relation
 
2 morality
2 morality2 morality
2 morality
 
3 rights and duties
3 rights and duties3 rights and duties
3 rights and duties
 
1 general ethics
1 general ethics1 general ethics
1 general ethics
 

KĂĽrzlich hochgeladen

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂşjo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

KĂĽrzlich hochgeladen (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 âś“Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

10 data structures

  • 1. Data Structures and Algorithms Sequential Search @ There are instances when you do not know the element number, but you do know the value of the element. In this case a search must be made on the array to find the correct element. The easiest way to search an array is called a sequential search. Data Structures *Property of STI Page 1 of 49
  • 2. Data Structures and Algorithms Binary Search Data Structures *Property of STI Page 2 of 49
  • 3. Data Structures and Algorithms Binary Search Example of a Binary Search A 1 5 2 7 Order of comparisons to find the element number of 44: 3 9 4 12 1. Element 7 (UB = 13, LB = 1, Element 5 15 Number = 7) 2. Element 10 (UB = 13, LB = 8, Element 6 Number 10) 20 7 25 3. Element 12 (UB = 13, LB = 11, 8 28 Element Number = 12) 9 33 Number 44 is found in three comparisons, 10 35 compared to 12 with the sequential 11 40 search. 12 44 13 47 Data Structures *Property of STI Page 3 of 49
  • 4. Data Structures and Algorithms Pointer Technique Data Structures *Property of STI Page 4 of 49
  • 5. Data Structures and Algorithms Pointer Technique Data Structures *Property of STI Page 5 of 49
  • 6. Data Structures and Algorithms Pointer Technique Data Structures *Property of STI Page 6 of 49
  • 7. Data Structures and Algorithms Pointer Technique The element number of the frequency distribution array is the number of points correct and the value of the element is the number of students that received that grade. Therefore, the frequency distribution array F shows that there is 1 student who received 1 point, 1 that received 2 points, 2 that received 3 points, 1 that received 4 points, 1 that received 5 points, 3 that received 6 points, 4 that received 7 points, 5 that received 8 points, 6 that received 9 points and 6 that received 10 points. Data Structures *Property of STI Page 7 of 49
  • 8. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 8 of 49
  • 9. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 9 of 49
  • 10. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 10 of 49
  • 11. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 11 of 49
  • 12. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 12 of 49
  • 13. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 13 of 49
  • 14. Data Structures and Algorithms Cross-Tabulation Data Structures *Property of STI Page 14 of 49
  • 15. Data Structures and Algorithms Sorting Techniques Selection Exchange Sort Technique @ Sorting – is the process of putting data in alphabetical or numeric order using one key field or a concatenation of two or more fields. Data are sorted according to the primary key. Once the data are in order, they can be accessed by various means, including the sequential search and the binary search. Data Structures *Property of STI Page 15 of 49
  • 16. Data Structures and Algorithms Sorting Techniques The Selection Exchange Sort Data Structures *Property of STI Page 16 of 49
  • 17. Data Structures and Algorithms Sorting Techniques Flowchart and Algorithm for SWAP Module Data Structures *Property of STI Page 17 of 49
  • 18. Data Structures and Algorithms Sorting Techniques Example Pass, I = 1 Data Structures *Property of STI Page 18 of 49
  • 19. Data Structures and Algorithms Sorting Techniques Bubble Sort Data Structures *Property of STI Page 19 of 49
  • 20. Data Structures and Algorithms Sorting Techniques Flowchart and Algorithm for Bubble Sort Data Structures *Property of STI Page 20 of 49
  • 21. Data Structures and Algorithms Sorting Techniques Shell Sort Data Structures *Property of STI Page 21 of 49
  • 22. Data Structures and Algorithms Sorting Techniques Algorithm and Flowchart for the Shell Sort Data Structures *Property of STI Page 22 of 49
  • 23. Data Structures and Algorithms Stacks @ A Stack is a list of numbers, such as an array of numbers, to which all additions are at one end and all deletions are at the same end. This is a last-in, first-out procedure. When a value (X) is added to the stack it is called pushing the stack. When a value (X) is used from the stack it is called popping the stack. PUSH 3 PUSH 4 PUSH 7 POP X POP X PUSH 6 Data Structures *Property of STI Page 23 of 49
  • 24. Data Structures and Algorithms Stacks Example of a Stack That Has Been Pushed and Popped Data Structures *Property of STI Page 24 of 49
  • 25. Data Structures and Algorithms Stacks Algorithm and Flowchart to Push and Pop a Stack Data Structures *Property of STI Page 25 of 49
  • 26. Data Structures and Algorithms Linked List @ A Linked List is a file in which each record points to its successor, except for the last record, which has an end-of-list indicator. @ The method of pointing to the next record is a field, which contains the record number of the next record in order. This is called the linking field, since the value in this field links the records in proper order. Example of an Initially Created Linked List Data Structures *Property of STI Page 26 of 49
  • 27. Data Structures and Algorithms Linked List Example of A Linked List After Multiple Adds and Deletions Data Structures *Property of STI Page 27 of 49
  • 28. Data Structures and Algorithms Linked List Original File Comment: Notice that records 5 and 9 are records that have been deleted in the past and are included in the empty list, even though there are data in the record. The used list skips these records . Data Structures *Property of STI Page 28 of 49
  • 29. Data Structures and Algorithms Linked List File After The Additions and Deletions Data Structures *Property of STI Page 29 of 49
  • 30. Data Structures and Algorithms Linked List Add 69 Data Structures *Property of STI Page 30 of 49
  • 31. Data Structures and Algorithms Linked List Delete 17 Data Structures *Property of STI Page 31 of 49
  • 32. Data Structures and Algorithms Linked List Delete 44 Data Structures *Property of STI Page 32 of 49
  • 33. Data Structures and Algorithms Linked List Add 37 Data Structures *Property of STI Page 33 of 49
  • 34. Data Structures and Algorithms Linked List Delete 29 Data Structures *Property of STI Page 34 of 49
  • 35. Data Structures and Algorithms Linked List Add 40 Data Structures *Property of STI Page 35 of 49
  • 36. Data Structures and Algorithms Linked List Add 90 Data Structures *Property of STI Page 36 of 49
  • 37. Data Structures and Algorithms Linked List Add 1 Data Structures *Property of STI Page 37 of 49
  • 38. Data Structures and Algorithms Linked List Add 16 Data Structures *Property of STI Page 38 of 49
  • 39. Data Structures and Algorithms Linked List Algorithm and Flowchart to Create a Linked List Data Structures *Property of STI Page 39 of 49
  • 40. Data Structures and Algorithms Linked List Algorithm and Flowchart for Processing and Updating a Linked List Data Structures *Property of STI Page 40 of 49
  • 41. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 41 of 49
  • 42. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 42 of 49
  • 43. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 43 of 49
  • 44. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 44 of 49
  • 45. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 45 of 49
  • 46. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 46 of 49
  • 47. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 47 of 49
  • 48. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 48 of 49
  • 49. Data Structures and Algorithms Linked List Data Structures *Property of STI Page 49 of 49