From 5eeda78e0dde9e12e5d288ba7267cecbd237c298 Mon Sep 17 00:00:00 2001 From: Yashvardhan suthar Date: Tue, 26 Jul 2022 11:50:49 +0530 Subject: [PATCH] Bubble Sort Algorithm / Yashvardhan_Suthar --- c++/BubbleSort.cpp | 32 ++++++++++++++++++++++++++++++++ c++/BubbleSort.exe | Bin 0 -> 124296 bytes 2 files changed, 32 insertions(+) create mode 100644 c++/BubbleSort.cpp create mode 100644 c++/BubbleSort.exe 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