0
2.9kviews
Write a program in C to perfrom Quick sort. Show steps with example
1 Answer
0
63views
  1. 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 …

Create a free account to keep reading this post.

and 4 others joined a min ago.

Please log in to add an answer.