8000 Update Bubble Sort.cpp · SelfCodeLearning/C-Plus-Plus@4f5f1f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f5f1f4

Browse files
authored
Update Bubble Sort.cpp
1 parent 5f791fe commit 4f5f1f4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sorting/Bubble Sort.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
//Bubble Sort
22

3-
43
#include <iostream>
54
#include <vector>
6-
75
using namespace std;
86

97
int main()
@@ -16,7 +14,6 @@ int main()
1614
cout << "Enter " << n << " numbers: ";
1715
int num;
1816

19-
2017
//Input
2118
for (int i = 0; i < n; i++)
2219
{
@@ -25,7 +22,6 @@ int main()
2522
}
2623

2724
//Bubble Sorting
28-
2925
for (int i = 0; (i < n) && (swap_check == 1); i++)
3026
{
3127
swap_check = 0;
@@ -52,7 +48,7 @@ int main()
5248
cout << numbers[i] << endl;
5349
}
5450
}
55-
return 0;
51+
return 0;
5652
}
5753

5854
/*The working principle of the Bubble sort algorithm:

0 commit comments

Comments
 (0)
0