From 151f393d870230908617def46690a91181740528 Mon Sep 17 00:00:00 2001 From: Jain-Saksham <53533762+Jain-Saksham@users.noreply.github.com> Date: Mon, 25 Oct 2021 18:41:11 +0530 Subject: [PATCH] Add files via upload --- Quick Sort.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Quick Sort.cpp diff --git a/Quick Sort.cpp b/Quick Sort.cpp new file mode 100644 index 00000000..837f3fb0 --- /dev/null +++ b/Quick Sort.cpp @@ -0,0 +1,49 @@ +#include +using namespace std; +void swap(int arr[],int i,int j) + { + int temp=arr[i]; + arr[i]=arr[j]; + arr[j]=temp; + } +int partition(int arr[],int l,int r) + { + int pivot=arr[r]; + int i=l-1; + for(int j=l;j>n; + int arr[n]; + for(int i=0;i>arr[i]; + } + quickSort(arr,0,n-1); + for(int i=0;i