0
2.9kviews
Write a program in C to perfrom Quick sort. Show steps with example
1 Answer
| written 7.2 years ago by | • modified 7.2 years ago |
Program for Quick Sort
#include<stdio.h>
#include<conio.h>
void swap(int* a, int* b)
{
int t = *a;
*a = *b;
*b = t;
}
int partition (int arr[], int low, int high)
{
int pivot = arr[high]; // pivot
int i = (low - 1); // Index of smaller element
int …