Descending Bubble Sort:
We can sorting data with bubble sort methods, This is example for Descending:
The data is:
We can sorting data with bubble sort methods, This is example for Descending:
The data is:
Record | [1] | [2] | [3] | [4] | [5] | [6] | [7] | [8] | [9] | [10] | ||
Data | 20 | 100 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | ||
Step 1 | 20 | 100 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 20 and 100 | , Exchange |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 80 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 10 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 70 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 30 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 60 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 90 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 40 | , No Exchange | |
100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 100 and 50 | , No Exchange | |
Result 1 | 100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | ||
Step 2 | 100 | 20 | 80 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 20 and 80 | , Exchange |
100 | 80 | 20 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 80 and 10 | , No Exchange | |
100 | 80 | 20 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 80 and 70 | , No Exchange | |
100 | 80 | 20 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 80 and 30 | , No Exchange | |
100 | 80 | 20 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 80 and 60 | , No Exchange | |
100 | 80 | 20 | 10 | 70 | 30 | 60 | 90 | 40 | 50 | 80 and 90 | , Exchange | |
100 | 90 | 20 | 10 | 70 | 30 | 60 | 80 | 40 | 50 | 90 and 40 | , No Exchange | |
100 | 90 | 20 | 10 | 70 | 30 | 60 | 80 | 40 | 50 | 90 and 50 | , No Exchange | |
Result 2 | 100 | 90 | 20 | 10 | 70 | 30 | 60 | 80 | 40 | 50 | ||
Step 3 | 100 | 90 | 20 | 10 | 70 | 30 | 60 | 80 | 40 | 50 | 20 and 10 | , Exchange |
100 | 90 | 20 | 10 | 70 | 30 | 60 | 80 | 40 | 50 | 20 and 70 | , Exchange | |
100 | 90 | 70 | 10 | 20 | 30 | 60 | 80 | 40 | 50 | 70 and 30 | , No Exchange | |
100 | 90 | 70 | 10 | 20 | 30 | 60 | 80 | 40 | 50 | 70 and 60 | , No Exchange | |
100 | 90 | 70 | 10 | 20 | 30 | 60 | 80 | 40 | 50 | 70 and 80 | , Exchange | |
100 | 90 | 80 | 10 | 20 | 30 | 60 | 70 | 40 | 50 | 80 and 40 | , No Exchange | |
100 | 90 | 80 | 10 | 20 | 30 | 60 | 70 | 40 | 50 | 80 and 50 | , No Exchange | |
Result 3 | 100 | 90 | 80 | 10 | 20 | 30 | 60 | 70 | 40 | 50 | ||
Step 4 | 100 | 90 | 80 | 10 | 20 | 30 | 60 | 70 | 40 | 50 | 10 and 20 | , Exchange |
100 | 90 | 80 | 20 | 10 | 30 | 60 | 70 | 40 | 50 | 20 and 30 | , Exchange | |
100 | 90 | 80 | 30 | 10 | 20 | 60 | 70 | 40 | 50 | 30 and 60 | , Exchange | |
100 | 90 | 80 | 60 | 10 | 20 | 30 | 70 | 40 | 50 | 60 and 70 | , Exchange | |
100 | 90 | 80 | 70 | 10 | 20 | 30 | 60 | 40 | 50 | 70 and 40 | , No Exchange | |
100 | 90 | 80 | 70 | 10 | 20 | 30 | 60 | 40 | 50 | 70 and 50 | , No Exchange | |
Result 4 | 100 | 90 | 80 | 70 | 10 | 20 | 30 | 60 | 40 | 50 | ||
Step 5 | 100 | 90 | 80 | 70 | 10 | 20 | 30 | 60 | 40 | 50 | 10 and 20 | , Exchange |
100 | 90 | 80 | 70 | 20 | 10 | 30 | 60 | 40 | 50 | 20 and 30 | , Exchange | |
100 | 90 | 80 | 70 | 30 | 10 | 20 | 60 | 40 | 50 | 30 and 60 | , Exchange | |
100 | 90 | 80 | 70 | 60 | 10 | 20 | 30 | 40 | 50 | 60 and 40 | , No Exchange | |
100 | 90 | 80 | 70 | 60 | 10 | 20 | 30 | 40 | 50 | 60 and 50 | , No Exchange | |
Result 5 | 100 | 90 | 80 | 70 | 60 | 10 | 20 | 30 | 40 | 50 | ||
Step 6 | 100 | 90 | 80 | 70 | 60 | 10 | 20 | 30 | 40 | 50 | 10 and 20 | , Exchange |
100 | 90 | 80 | 70 | 60 | 20 | 10 | 30 | 40 | 50 | 20 and 30 | , Exchange | |
100 | 90 | 80 | 70 | 60 | 30 | 10 | 20 | 40 | 50 | 30 and 40 | , Exchange | |
100 | 90 | 80 | 70 | 60 | 40 | 10 | 20 | 30 | 50 | 40 and 50 | , Exchange | |
Result 6 | 100 | 90 | 80 | 70 | 60 | 50 | 10 | 20 | 30 | 40 | ||
Step 7 | 100 | 90 | 80 | 70 | 60 | 50 | 10 | 20 | 30 | 40 | 10 and 20 | , Exchange |
100 | 90 | 80 | 70 | 60 | 50 | 20 | 10 | 30 | 40 | 20 and 30 | , Exchange | |
100 | 90 | 80 | 70 | 60 | 50 | 30 | 10 | 20 | 40 | 30 and 40 | , Exchange | |
Result 7 | 100 | 90 | 80 | 70 | 60 | 50 | 40 | 10 | 20 | 30 | ||
Step 8 | 100 | 90 | 80 | 70 | 60 | 50 | 40 | 10 | 20 | 30 | 10 and 20 | , Exchange |
100 | 90 | 80 | 70 | 60 | 50 | 40 | 20 | 10 | 30 | 20 and 30 | , Exchange | |
Result 8 | 100 | 90 | 80 | 70 | 60 | 50 | 40 | 30 | 10 | 20 | ||
Step 9 | 100 | 90 | 80 | 70 | 60 | 50 | 40 | 30 | 10 | 20 | 10 and 20 | , Exchange |
Result 9 | 100 | 90 | 80 | 70 | 60 | 50 | 40 | 30 | 20 | 10 |