From e5a6467407b8c66e444f555879d3cc7649a0f59f Mon Sep 17 00:00:00 2001 From: Aman Date: Thu, 26 Oct 2023 16:05:10 +0530 Subject: [PATCH] Added bubble sort buggy code for C++ --- C++/bubblesort.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 C++/bubblesort.cpp diff --git a/C++/bubblesort.cpp b/C++/bubblesort.cpp new file mode 100644 index 0000000..4c57fe7 --- /dev/null +++ b/C++/bubblesort.cpp @@ -0,0 +1,24 @@ +#include +using namespace std; + +void bubbleSort(int arr[],int len){ + for (int i = 0; i < len-2; i++) { + for (int j = 0; j < len - i - 1; j++) { + if(arr[j]