From 1e03f043ab11dbce1fcf40518799cc7f6edcefeb Mon Sep 17 00:00:00 2001 From: Udhay <72250606+Udhay-Brahmi@users.noreply.github.com> Date: Wed, 9 Dec 2020 10:59:23 +0530 Subject: [PATCH] Create Bubble Sort --- Bubble Sort | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Bubble Sort diff --git a/Bubble Sort b/Bubble Sort new file mode 100644 index 000000000..39d7e2674 --- /dev/null +++ b/Bubble Sort @@ -0,0 +1,8 @@ +void bubble(int arr[], int i, int n) +{ + // Your code here + + for(int j=0;j<(n-1);j++){ + if(arr[j]>arr[j+1]){swap(&arr[j] , &arr[j+1]);} + } +}