Bubble Sort PP
Bubble Sort PP
Author
Riful Hassan Tonmoy, Afifa Tabassum
Bishal Sarkar
Presented To:
ABRAR HASAN
OUTLINES
Definition
How Does Bubble Sort
Work
Example of Bubble Sort
When to Use Bubble
Sort
WHAT IS BUBBLE
SORT
Bubble Sort is a simple sorting algorithm that repeatedly
iterates through a list, comparing adjacent elements and
swapping them if they are in the wrong order
5 3 8 4 6
3 5 8 4 6
HOW BUBBLE SORT
WORK
3 1
1 2 3 4
4 2
EXAMPLE OF BUBBLE
SORT
WHEN TO USE BUBBLE
SORT
Educational purpose
Small datasets
Almost sorted data
ADVANTAGES &
DISADVANTAGES
✅Advantages:
Simple and easy to implement.
Stable sorting algorithm.
Works well for small lists.
❌ Disadvantages:
Very slow for large datasets.
Not used in practical applications.
Other sorting algorithms like Quick
Sort & Merge Sort are much faster.
GRAPHICAL REPRESENTATION OF
BUBBLE SORT
4 3 2 1
2 3 1 4
3 4 2 1
2 1 3 4
3 2 4 1
1 2 3 4
3 2 1 4
CONCLUSION
THANK YOU!
ANY QUESTION?