diff --git a/C++/bubble_sort.cpp b/C++/bubble_sort.cpp new file mode 100644 index 0000000..dc95776 --- /dev/null +++ b/C++/bubble_sort.cpp @@ -0,0 +1,39 @@ +#include +using namespace std; +void bubble_sort(int arr[],int n) +{ + for(int i=0;iarr[j+1]) + swap(arr[j],arr[j+1]); + } + } +} +void print(int arr[],int size) +{ + int i; + for(i=0;i