8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f791fe commit 4f5f1f4Copy full SHA for 4f5f1f4
sorting/Bubble Sort.cpp
@@ -1,9 +1,7 @@
1
//Bubble Sort
2
3
-
4
#include <iostream>
5
#include <vector>
6
7
using namespace std;
8
9
int main()
@@ -16,7 +14,6 @@ int main()
16
14
cout << "Enter " << n << " numbers: ";
17
15
int num;
18
19
20
//Input
21
for (int i = 0; i < n; i++)
22
{
@@ -25,7 +22,6 @@ int main()
25
}
26
23
27
24
//Bubble Sorting
28
29
for (int i = 0; (i < n) && (swap_check == 1); i++)
30
31
swap_check = 0;
@@ -52,7 +48,7 @@ int main()
52
48
cout << numbers[i] << endl;
53
49
54
50
55
- return 0;
51
+ return 0;
56
57
58
/*The working principle of the Bubble sort algorithm:
0 commit comments