diff --git a/c++/BubbleSort.cpp b/c++/BubbleSort.cpp new file mode 100644 index 0000000..2f1ef07 --- /dev/null +++ b/c++/BubbleSort.cpp @@ -0,0 +1,32 @@ +#include +using namespace std; +int sort(int n,int arr[]){ +for(int i=0;iarr[j+1]){ + int temp; + temp=arr[j+1]; + arr[j+1]=arr[j]; + arr[j]=temp; + } + } + } + cout<<"{"; + for(int i=0;i