8
Most read
10 HANDS ON ACTIVITY 1
DATA STRUCTURES AND
ALGORITHMS
ESTACIO, MARK ANTHONY Y.
BSIT-2A
BUBBLE SORT
EVERY PAIR OF ADJACENT ITEMS IS COMPARED, AND
ITEMS ARE SWAPPED UNTIL THEY ARE IN ORDER
BUBBLE SORT
 SORTING TYPE: BUBBLE SORT
 VALUES (21,4,25,16)
21 4 25 16
BUBBLE SORT STARTS WITH VERY FIRST TWO ELEMENTS COMPARING
THEM TO CHECK WHICH ONE IS GREATER.
4 21 25 16
FIRST STEP
RESULT
BUBBLE SORT
SECOND STEP
4 21 25 16 4 21 25 16
NEXT WE COMPARE 21 AND 25, BUT FIND OUT THAT
BOTH ARE IN ALREADY SORTED POSITIONS
RESULT
BUBBLE SORT
THIRD STEP
WE MOVE TO THE NEXT TWO VALUES, 25 AND 16
4 21 25 16 4 21 16 25
RESULT
BUBBLE SORT
FOURTH STEP
WE MOVE TO THE NEXT TWO VALUES, 4 AND 21 AS
WE CAN SEE BOTH ARE IN ALREADY SORTED
POSITIONS
4 21 16 25 4 21 16 25
RESULT
BUBBLE SORT
FIFTH STEP
WE MOVE TO THE LAST TWO VALUES,
WHICH IS 21 AND 16
4 21 16 25 4 16 21 25
RESULT
BUBBLE SORT
OVERALL ANSWER FOR BUBBLE SORT
VALUES (21,4,25,16)
21 4 25 16
4 21 25 16
4 21 25 16
4 21 16 25
4 21 16 25
4 21 25 16
4 21 25 16
4 21 16 25
4 21 16 25
4 16 21 25

More Related Content

PPTX
Java swing
PPTX
ICT in Education ppt
PPTX
Information and Communication Technology in Education
PPTX
Syllable and syllabification
PPTX
Arrays in java
PPTX
Excel for kids
PPTX
AN INTRODUCTION TO EMERGING TECHNOLOGY
PPTX
Diabetes Mellitus
Java swing
ICT in Education ppt
Information and Communication Technology in Education
Syllable and syllabification
Arrays in java
Excel for kids
AN INTRODUCTION TO EMERGING TECHNOLOGY
Diabetes Mellitus

What's hot (20)

PPTX
Bubble sort | Data structure |
PPT
dynamic programming Rod cutting class
PPTX
Binary Arithmetic
PPTX
Pipelining of Processors
PPTX
Heaptree
PPTX
Database Concept - Normalization (1NF, 2NF, 3NF)
PPTX
Input - Output Organization and I/O Interface
PPTX
Register transfer language
PPTX
Trees data structure
PDF
Array linear data_structure_2 (1)
PPTX
Binary and hex input/output (in 8086 assembuly langyage)
PPT
Floating point arithmetic
PPT
Introduction to the Binary Number System
PPTX
AVL Tree
PPT
Digital Logic Design
PDF
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
PDF
Binary codes
PDF
Chapter 7 - Programming Techniques with Additional Instructions
PPTX
trees in data structure
PPTX
The Indonesian Ancestors Part 2
Bubble sort | Data structure |
dynamic programming Rod cutting class
Binary Arithmetic
Pipelining of Processors
Heaptree
Database Concept - Normalization (1NF, 2NF, 3NF)
Input - Output Organization and I/O Interface
Register transfer language
Trees data structure
Array linear data_structure_2 (1)
Binary and hex input/output (in 8086 assembuly langyage)
Floating point arithmetic
Introduction to the Binary Number System
AVL Tree
Digital Logic Design
Assembly Language Programming By Ytha Yu, Charles Marut Chap 8 (The Stack and...
Binary codes
Chapter 7 - Programming Techniques with Additional Instructions
trees in data structure
The Indonesian Ancestors Part 2
Ad

Recently uploaded (20)

PPTX
GSA Content Generator Crack (2025 Latest)
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PPTX
CNN LeNet5 Architecture: Neural Networks
PPTX
most interesting chapter in the world ppt
PPTX
Tech Workshop Escape Room Tech Workshop
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Introduction to Windows Operating System
PDF
BoxLang Dynamic AWS Lambda - Japan Edition
PDF
Website Design Services for Small Businesses.pdf
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
Download Adobe Photoshop Crack 2025 Free
PDF
E-Commerce Website Development Companyin india
PDF
DNT Brochure 2025 – ISV Solutions @ D365
PDF
Guide to Food Delivery App Development.pdf
PPTX
Computer Software - Technology and Livelihood Education
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
GSA Content Generator Crack (2025 Latest)
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
CNN LeNet5 Architecture: Neural Networks
most interesting chapter in the world ppt
Tech Workshop Escape Room Tech Workshop
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
MLforCyber_MLDataSetsandFeatures_Presentation.pptx
iTop VPN Crack Latest Version Full Key 2025
Introduction to Windows Operating System
BoxLang Dynamic AWS Lambda - Japan Edition
Website Design Services for Small Businesses.pdf
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Download Adobe Photoshop Crack 2025 Free
E-Commerce Website Development Companyin india
DNT Brochure 2025 – ISV Solutions @ D365
Guide to Food Delivery App Development.pdf
Computer Software - Technology and Livelihood Education
Autodesk AutoCAD Crack Free Download 2025
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Ad

10 hands on activity 1 data structures and algorithm

  • 1. 10 HANDS ON ACTIVITY 1 DATA STRUCTURES AND ALGORITHMS ESTACIO, MARK ANTHONY Y. BSIT-2A
  • 2. BUBBLE SORT EVERY PAIR OF ADJACENT ITEMS IS COMPARED, AND ITEMS ARE SWAPPED UNTIL THEY ARE IN ORDER
  • 3. BUBBLE SORT  SORTING TYPE: BUBBLE SORT  VALUES (21,4,25,16) 21 4 25 16 BUBBLE SORT STARTS WITH VERY FIRST TWO ELEMENTS COMPARING THEM TO CHECK WHICH ONE IS GREATER. 4 21 25 16 FIRST STEP RESULT
  • 4. BUBBLE SORT SECOND STEP 4 21 25 16 4 21 25 16 NEXT WE COMPARE 21 AND 25, BUT FIND OUT THAT BOTH ARE IN ALREADY SORTED POSITIONS RESULT
  • 5. BUBBLE SORT THIRD STEP WE MOVE TO THE NEXT TWO VALUES, 25 AND 16 4 21 25 16 4 21 16 25 RESULT
  • 6. BUBBLE SORT FOURTH STEP WE MOVE TO THE NEXT TWO VALUES, 4 AND 21 AS WE CAN SEE BOTH ARE IN ALREADY SORTED POSITIONS 4 21 16 25 4 21 16 25 RESULT
  • 7. BUBBLE SORT FIFTH STEP WE MOVE TO THE LAST TWO VALUES, WHICH IS 21 AND 16 4 21 16 25 4 16 21 25 RESULT
  • 8. BUBBLE SORT OVERALL ANSWER FOR BUBBLE SORT VALUES (21,4,25,16) 21 4 25 16 4 21 25 16 4 21 25 16 4 21 16 25 4 21 16 25 4 21 25 16 4 21 25 16 4 21 16 25 4 21 16 25 4 16 21 25